use of org.apache.knox.gateway.topology.builder.property.Property in project knox by apache.
the class PropertyTopologyBuilderTest method testBuildSuccessfulForProviderProperty.
@Test
public void testBuildSuccessfulForProviderProperty() {
PropertyTopologyBuilder propertyTopologyBuilder = new PropertyTopologyBuilder();
propertyTopologyBuilder.addProperty(new Property("topology.gateway.provider.authentication.ShiroProvider.enabled", "value"));
Topology topology = propertyTopologyBuilder.build();
assertThat(topology, notNullValue());
assertThat(topology.getProviders().size(), is(1));
assertThat(topology.getProviders().iterator().next().isEnabled(), is(false));
}
use of org.apache.knox.gateway.topology.builder.property.Property in project knox by apache.
the class PropertyTopologyBuilderTest method testBuildFailedForEmptyProviderParamValue.
@Test(expected = IllegalArgumentException.class)
public void testBuildFailedForEmptyProviderParamValue() {
PropertyTopologyBuilder propertyTopologyBuilder = new PropertyTopologyBuilder();
propertyTopologyBuilder.addProperty(new Property("topology.gateway.provider.authentication.ShiroProvider.param.name1", ""));
propertyTopologyBuilder.build();
}
use of org.apache.knox.gateway.topology.builder.property.Property in project knox by apache.
the class PropertyTopologyBuilderTest method testBuildFailedForWrongProviderToken3.
@Test(expected = IllegalArgumentException.class)
public void testBuildFailedForWrongProviderToken3() {
PropertyTopologyBuilder propertyTopologyBuilder = new PropertyTopologyBuilder();
propertyTopologyBuilder.addProperty(new Property("topology.gateway.provider.authentication.ShiroProvider", "value"));
propertyTopologyBuilder.build();
}
Aggregations