Search in sources :

Example 6 with Property

use of org.apache.knox.gateway.topology.builder.property.Property in project knox by apache.

the class PropertyTopologyBuilderTest method testBuildFailedForWrongProviderProperty.

@Test(expected = IllegalArgumentException.class)
public void testBuildFailedForWrongProviderProperty() {
    PropertyTopologyBuilder propertyTopologyBuilder = new PropertyTopologyBuilder();
    propertyTopologyBuilder.addProperty(new Property("topology.gateway.provider.authentication.ShiroProvider.miss_prop", "value"));
    propertyTopologyBuilder.build();
}
Also used : Property(org.apache.knox.gateway.topology.builder.property.Property) Test(org.junit.Test)

Example 7 with Property

use of org.apache.knox.gateway.topology.builder.property.Property in project knox by apache.

the class PropertyTopologyBuilderTest method testBuildFailedForEmptyProviderParamName.

@Test(expected = IllegalArgumentException.class)
public void testBuildFailedForEmptyProviderParamName() {
    PropertyTopologyBuilder propertyTopologyBuilder = new PropertyTopologyBuilder();
    propertyTopologyBuilder.addProperty(new Property("topology.gateway.provider.authentication.ShiroProvider.param.", "value"));
    propertyTopologyBuilder.build();
}
Also used : Property(org.apache.knox.gateway.topology.builder.property.Property) Test(org.junit.Test)

Example 8 with Property

use of org.apache.knox.gateway.topology.builder.property.Property in project knox by apache.

the class PropertyTopologyBuilderTest method testBuildSuccessfulForTopologyProperty.

@Test
public void testBuildSuccessfulForTopologyProperty() {
    PropertyTopologyBuilder propertyTopologyBuilder = new PropertyTopologyBuilder();
    propertyTopologyBuilder.addProperty(new Property("topology.name", "topology"));
    Topology topology = propertyTopologyBuilder.build();
    assertThat(topology, notNullValue());
}
Also used : Topology(org.apache.knox.gateway.topology.Topology) Property(org.apache.knox.gateway.topology.builder.property.Property) Test(org.junit.Test)

Example 9 with Property

use of org.apache.knox.gateway.topology.builder.property.Property in project knox by apache.

the class PropertyTopologyBuilderTest method testBuildFailedForWrongProviderToken2.

@Test(expected = IllegalArgumentException.class)
public void testBuildFailedForWrongProviderToken2() {
    PropertyTopologyBuilder propertyTopologyBuilder = new PropertyTopologyBuilder();
    propertyTopologyBuilder.addProperty(new Property("topology.gateway.provider.authentication", "value"));
    propertyTopologyBuilder.build();
}
Also used : Property(org.apache.knox.gateway.topology.builder.property.Property) Test(org.junit.Test)

Example 10 with Property

use of org.apache.knox.gateway.topology.builder.property.Property in project knox by apache.

the class PropertyTopologyBuilderTest method testBuildFailedForWrongServiceToken1.

@Test(expected = IllegalArgumentException.class)
public void testBuildFailedForWrongServiceToken1() {
    PropertyTopologyBuilder propertyTopologyBuilder = new PropertyTopologyBuilder();
    propertyTopologyBuilder.addProperty(new Property("topology.gateway.service", "value"));
    propertyTopologyBuilder.build();
}
Also used : Property(org.apache.knox.gateway.topology.builder.property.Property) Test(org.junit.Test)

Aggregations

Property (org.apache.knox.gateway.topology.builder.property.Property)18 Test (org.junit.Test)17 Topology (org.apache.knox.gateway.topology.Topology)4 InterpretException (org.apache.knox.gateway.topology.builder.property.interpreter.InterpretException)1 PropertyInterpreter (org.apache.knox.gateway.topology.builder.property.interpreter.PropertyInterpreter)1