use of org.apache.synapse.commons.resolvers.Resolver 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());
}
use of org.apache.synapse.commons.resolvers.Resolver in project wso2-synapse by wso2.
the class ResolverFactoryTest method testSystemResolver.
public void testSystemResolver() {
String synapseVariable = "$SYSTEM:VAR";
String envValue = "https://localhost:8080/service";
Resolver resolver = ResolverFactory.getInstance().getResolver(synapseVariable);
assertNotNull(resolver);
assertTrue(resolver instanceof SystemResolver);
EnvironmentVariables environmentVariables = new EnvironmentVariables();
environmentVariables.set("VAR", envValue);
assertEquals(envValue, resolver.resolve());
}
use of org.apache.synapse.commons.resolvers.Resolver 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());
}
use of org.apache.synapse.commons.resolvers.Resolver 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());
}
use of org.apache.synapse.commons.resolvers.Resolver in project wso2-synapse by wso2.
the class ResolverFactoryTest method testGetSystemResolver.
public void testGetSystemResolver() {
String synapseVariable = "$SYSTEM:VAR";
Resolver resolver = ResolverFactory.getInstance().getResolver(synapseVariable);
assertNotNull(resolver);
assertTrue(resolver instanceof SystemResolver);
}
Aggregations