use of org.wildfly.swarm.spi.api.config.SimpleKey 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.SimpleKey in project wildfly-swarm by wildfly-swarm.
the class ConfigNodeTest method testValueOf_flat.
@Test
public void testValueOf_flat() {
ConfigNode config = new ConfigNode();
config.child("cheese", "cheddar");
config.child("amount", "42");
assertThat(config.valueOf(new SimpleKey("cheese"))).isEqualTo("cheddar");
assertThat(config.valueOf(new SimpleKey("amount"))).isEqualTo("42");
}
use of org.wildfly.swarm.spi.api.config.SimpleKey in project wildfly-swarm by wildfly-swarm.
the class SimpleKeyTest method testSubkey.
@Test
public void testSubkey() {
SimpleKey key = new SimpleKey("hi");
assertThat(key.subkey(0)).isEqualTo(key);
assertThat(key.subkey(1)).isEqualTo(ConfigKey.EMPTY);
}
Aggregations