use of org.mule.test.petstore.extension.PetStoreClient in project mule by mulesoft.
the class PetStoreConnectionTestCase method getClient.
protected PetStoreClient getClient() throws Exception {
PetStoreClient client = (PetStoreClient) runFlow("getClient").getMessage().getPayload().getValue();
assertThat(client, is(notNullValue()));
return client;
}
use of org.mule.test.petstore.extension.PetStoreClient in project mule by mulesoft.
the class PetStoreConnectionTestCase method verifyClient.
@Test
public void verifyClient() throws Exception {
PetStoreClient client = getClient();
assertValidClient(client);
}
use of org.mule.test.petstore.extension.PetStoreClient in project mule by mulesoft.
the class PetStoreISO8601DateParsingTestCase method testDateTimeList.
@Test
public void testDateTimeList() throws Exception {
PetStoreClient client = getClient("getDateTimeList");
List<LocalDateTime> dates = client.getDiscountDates();
assertEquals(dates.size(), 1);
assertDateTime(dates.get(0));
}
use of org.mule.test.petstore.extension.PetStoreClient in project mule by mulesoft.
the class PetStoreISO8601DateParsingTestCase method testDateList.
@Test
public void testDateList() throws Exception {
Calendar calendar = Calendar.getInstance();
PetStoreClient client = getClient("getDateList");
List<Date> dates = client.getClosedForHolidays();
calendar.setTime(dates.get(0));
assertEquals(dates.size(), 1);
assertDate(calendar);
}
use of org.mule.test.petstore.extension.PetStoreClient in project mule by mulesoft.
the class PetStoreConnectionTestCase method stopAndDisconnect.
@Test
public void stopAndDisconnect() throws Exception {
PetStoreClient client = getClient();
muleContext.stop();
assertThat(client.getDisconnectCount(), is(1));
assertThat(client.hasActiveConnection(), is(false));
}
Aggregations