use of org.wildfly.swarm.spi.api.config.CompositeKey in project wildfly-swarm by wildfly-swarm.
the class CompositeKeyTest method testSubkey.
@Test
public void testSubkey() {
CompositeKey key = new CompositeKey("foo", "bar", "baz");
assertThat(key.subkey(1).head()).isEqualTo(new SimpleKey("bar"));
assertThat(key.subkey(2).head()).isEqualTo(new SimpleKey("baz"));
assertThat(key.subkey(3).head()).isEqualTo(ConfigKey.EMPTY);
}
use of org.wildfly.swarm.spi.api.config.CompositeKey in project wildfly-swarm by wildfly-swarm.
the class CompositeKeyTest method testHead.
@Test
public void testHead() {
CompositeKey key = new CompositeKey("foo", "bar", "baz");
assertThat(key.head()).isEqualTo(new SimpleKey("foo"));
}
use of org.wildfly.swarm.spi.api.config.CompositeKey in project wildfly-swarm by wildfly-swarm.
the class CompositeKeyTest method testName.
@Test
public void testName() {
CompositeKey key = new CompositeKey("foo", "bar", "baz");
assertThat(key.name()).isEqualTo("foo.bar.baz");
}
Aggregations