Search in sources :

Example 1 with Library

use of org.talend.services.test.library._1_0.Library in project tesb-rt-se by Talend.

the class SamEnablingAssertionTest method commonTest.

private void commonTest(String testName, String searchFor, String isbn, String expectedResult) {
    final String dir = testName;
    serviceContext = startParticipants(dir);
    Library client = (Library) serviceContext.getBean("libraryHttp");
    ListOfBooks response = null;
    try {
        response = searchFor(searchFor, isbn, client);
    } catch (SeekBookError e) {
        fail("Exception during service call");
    }
    assertEquals("Books amount in response differs from 1", 1, booksInResponse(response));
    assertEquals("Received unexpected author name", expectedResult, authorLastName(response));
}
Also used : SeekBookError(org.talend.services.test.library._1_0.SeekBookError) Library(org.talend.services.test.library._1_0.Library) ListOfBooks(org.talend.types.test.library.common._1.ListOfBooks)

Example 2 with Library

use of org.talend.services.test.library._1_0.Library in project tesb-rt-se by Talend.

the class SamEnablingFeatureTest method commonTest.

private void commonTest(String testName, String searchFor, String isbn, String expectedResult) {
    final String dir = testName;
    serviceContext = startProvider(dir);
    Library client = (Library) serviceContext.getBean("libraryHttp");
    ListOfBooks response = null;
    try {
        response = searchFor(searchFor, isbn, client);
    } catch (SeekBookError e) {
        fail("Exception during service call");
    }
    assertEquals("Books amount in response differs from 1", 1, booksInResponse(response));
    assertEquals("Received unexpected author name", expectedResult, authorLastName(response));
}
Also used : SeekBookError(org.talend.services.test.library._1_0.SeekBookError) Library(org.talend.services.test.library._1_0.Library) ListOfBooks(org.talend.types.test.library.common._1.ListOfBooks)

Example 3 with Library

use of org.talend.services.test.library._1_0.Library in project tesb-rt-se by Talend.

the class CompressionAssertionTest method commonTest.

private void commonTest(String testName, String searchFor, String isbn, String expectedResult) {
    final String dir = testName;
    serviceContext = startParticipants(dir);
    Library client = (Library) serviceContext.getBean("libraryHttp");
    ListOfBooks response = null;
    try {
        response = searchFor(searchFor, isbn, client);
    } catch (SeekBookError e) {
        fail("Exception during service call");
    }
    assertEquals("Books amount in response differs from 1", 1, booksInResponse(response));
    assertEquals("Received unexpected author name", expectedResult, authorLastName(response));
}
Also used : SeekBookError(org.talend.services.test.library._1_0.SeekBookError) Library(org.talend.services.test.library._1_0.Library) ListOfBooks(org.talend.types.test.library.common._1.ListOfBooks)

Example 4 with Library

use of org.talend.services.test.library._1_0.Library in project tesb-rt-se by Talend.

the class CompressionFeatureTest method commonTest.

private void commonTest(String testName, String searchFor, String isbn, String expectedResult) {
    final String dir = testName;
    serviceContext = startProvider(dir);
    Library client = (Library) serviceContext.getBean("libraryHttp");
    ListOfBooks response = null;
    try {
        response = searchFor(searchFor, isbn, client);
    } catch (SeekBookError e) {
        fail("Exception during service call");
    }
    assertEquals("Books amount in response differs from 1", 1, booksInResponse(response));
    assertEquals("Received unexpected author name", expectedResult, authorLastName(response));
}
Also used : SeekBookError(org.talend.services.test.library._1_0.SeekBookError) Library(org.talend.services.test.library._1_0.Library) ListOfBooks(org.talend.types.test.library.common._1.ListOfBooks)

Example 5 with Library

use of org.talend.services.test.library._1_0.Library in project tesb-rt-se by Talend.

the class CorrelationFeatureTest method commonTest.

private void commonTest(String testName, String searchFor, String expectedResult) {
    LOG.setLevel(Level.FINE);
    final String dir = testName;
    serviceContext = startParticipants(dir);
    retrieveInterceptors(serviceContext);
    Library client = (Library) serviceContext.getBean("libraryHttp");
    try {
        searchFor(searchFor, client);
    } catch (SeekBookError e) {
        fail("Exception during service call");
    }
    // assertEquals("Books amount in response differs from 1", 1, booksInResponse(response));
    assertNotNull(providerInInterceptor.getLatestCorrelationHeader());
    assertTrue(providerInInterceptor.getLatestCorrelationHeader().toString().contains(expectedResult));
// assertNotNull(consumerInInterceptor.getLatestCorrelationHeader());
// System.out.println("PROBLEM: " + consumerInInterceptor.getLatestCorrelationHeader());
// assertTrue(consumerInInterceptor.getLatestCorrelationHeader().toString().contains(expectedResult));
}
Also used : SeekBookError(org.talend.services.test.library._1_0.SeekBookError) Library(org.talend.services.test.library._1_0.Library)

Aggregations

Library (org.talend.services.test.library._1_0.Library)8 SeekBookError (org.talend.services.test.library._1_0.SeekBookError)8 ListOfBooks (org.talend.types.test.library.common._1.ListOfBooks)6