Search in sources :

Example 1 with DefaultResolver

use of org.apache.synapse.commons.resolvers.DefaultResolver in project wso2-synapse by wso2.

the class ResolverFactoryTest method testGetDefaultResolver.

public void testGetDefaultResolver() {
    String synapseVariable = "https://localhost:9443/services";
    Resolver resolver = ResolverFactory.getInstance().getResolver(synapseVariable);
    assertNotNull(resolver);
    assertTrue(resolver instanceof DefaultResolver);
    assertEquals(synapseVariable, resolver.resolve());
}
Also used : DefaultResolver(org.apache.synapse.commons.resolvers.DefaultResolver) SystemResolver(org.apache.synapse.commons.resolvers.SystemResolver) Resolver(org.apache.synapse.commons.resolvers.Resolver) DefaultResolver(org.apache.synapse.commons.resolvers.DefaultResolver)

Example 2 with DefaultResolver

use of org.apache.synapse.commons.resolvers.DefaultResolver in project wso2-synapse by wso2.

the class ResolverFactoryTest method testGetDefaultResolverUrl.

public void testGetDefaultResolverUrl() {
    String synapseVariable = "$url";
    Resolver resolver = ResolverFactory.getInstance().getResolver(synapseVariable);
    assertNotNull(resolver);
    assertTrue(resolver instanceof DefaultResolver);
    assertEquals(synapseVariable, resolver.resolve());
}
Also used : DefaultResolver(org.apache.synapse.commons.resolvers.DefaultResolver) SystemResolver(org.apache.synapse.commons.resolvers.SystemResolver) Resolver(org.apache.synapse.commons.resolvers.Resolver) DefaultResolver(org.apache.synapse.commons.resolvers.DefaultResolver)

Example 3 with DefaultResolver

use of org.apache.synapse.commons.resolvers.DefaultResolver in project wso2-synapse by wso2.

the class ResolverFactoryTest method testGetDefaultResolverUri.

public void testGetDefaultResolverUri() {
    String synapseVariable = "{uri.var.temp}";
    Resolver resolver = ResolverFactory.getInstance().getResolver(synapseVariable);
    assertNotNull(resolver);
    assertTrue(resolver instanceof DefaultResolver);
    assertEquals(synapseVariable, resolver.resolve());
}
Also used : DefaultResolver(org.apache.synapse.commons.resolvers.DefaultResolver) SystemResolver(org.apache.synapse.commons.resolvers.SystemResolver) Resolver(org.apache.synapse.commons.resolvers.Resolver) DefaultResolver(org.apache.synapse.commons.resolvers.DefaultResolver)

Aggregations

DefaultResolver (org.apache.synapse.commons.resolvers.DefaultResolver)3 Resolver (org.apache.synapse.commons.resolvers.Resolver)3 SystemResolver (org.apache.synapse.commons.resolvers.SystemResolver)3