blob: f50005edd5210182114ff039d8ab4b9c4a1eb4da (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.config.provision;
import org.junit.Test;
import java.util.Set;
import static org.junit.Assert.assertEquals;
/**
* @author hakonhall
*/
public class SystemNameTest {
@Test
public void test() {
for (SystemName name : SystemName.values()) {
assertEquals(name, SystemName.from(name.value()));
}
}
@Test
public void allOf() {
assertEquals(Set.of(SystemName.cd, SystemName.PublicCd), SystemName.allOf(SystemName::isCd));
assertEquals(Set.of(SystemName.PublicCd, SystemName.Public), SystemName.allOf(SystemName::isPublic));
}
}
|