Search in sources :

Example 1 with PetStoreConnector

use of org.mule.test.petstore.extension.PetStoreConnector in project mule by mulesoft.

the class PetStoreTlsConfigTestCase method tls.

@Test
public void tls() throws Exception {
    PetStoreConnector connector = getConfigurationFromRegistry(configName, testEvent(), muleContext);
    TlsContextFactory tls = connector.getTlsContext();
    assertTls(tls);
    TlsContextFactory tlsInsidePojo = connector.getCage().getTls();
    assertTls(tlsInsidePojo);
}
Also used : PetStoreConnector(org.mule.test.petstore.extension.PetStoreConnector) TlsContextFactory(org.mule.runtime.api.tls.TlsContextFactory) Test(org.junit.Test)

Example 2 with PetStoreConnector

use of org.mule.test.petstore.extension.PetStoreConnector in project mule by mulesoft.

the class PetStoreConnectionTestCase method getPets.

@Test
public void getPets() throws Exception {
    ConfigurationInstance config = muleContext.getExtensionManager().getConfiguration("petstore", testEvent());
    assertThat(config, is(notNullValue()));
    CoreEvent response = runFlow("getPets");
    List<String> pets = (List<String>) response.getMessage().getPayload().getValue();
    PetStoreConnector configValue = (PetStoreConnector) config.getValue();
    assertThat(pets, containsInAnyOrder(configValue.getPets().toArray()));
}
Also used : PetStoreConnector(org.mule.test.petstore.extension.PetStoreConnector) CoreEvent(org.mule.runtime.core.api.event.CoreEvent) List(java.util.List) ConfigurationInstance(org.mule.runtime.extension.api.runtime.config.ConfigurationInstance) Test(org.junit.Test)

Example 3 with PetStoreConnector

use of org.mule.test.petstore.extension.PetStoreConnector in project mule by mulesoft.

the class PetStoreDefaultEncodingTestCase method configEncoding.

@Test
public void configEncoding() throws Exception {
    PetStoreConnector config = (PetStoreConnector) flowRunner("configEncoding").run().getMessage().getPayload().getValue();
    assertDefaultEncoding(config.getEncoding());
}
Also used : PetStoreConnector(org.mule.test.petstore.extension.PetStoreConnector) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)3 PetStoreConnector (org.mule.test.petstore.extension.PetStoreConnector)3 List (java.util.List)1 TlsContextFactory (org.mule.runtime.api.tls.TlsContextFactory)1 CoreEvent (org.mule.runtime.core.api.event.CoreEvent)1 ConfigurationInstance (org.mule.runtime.extension.api.runtime.config.ConfigurationInstance)1