Skip to content

Instantly share code, notes, and snippets.

@tfennelly
Created July 21, 2011 12:44
Show Gist options
  • Save tfennelly/1097110 to your computer and use it in GitHub Desktop.
Save tfennelly/1097110 to your computer and use it in GitHub Desktop.
SwitchYard Testing
@SwitchYardTestCaseConfig(mixins = CDIMixIn.class)
public class BasicInOutTest extends SwitchYardTestCase {
@Test
public void test_New_Way() {
Message responseMsg = newInvoker("BasicOrderManagementService.createOrder").
sendInOut(new OrderRequest("D123", "ABCD"));
OrderResponse response = (OrderResponse) responseMsg.getContent();
Assert.assertEquals("D123", response.orderId);
}
}
@RunWith(SwitchYardRunner.class)
@SwitchYardTestCaseConfig(mixins = CDIMixIn.class)
public class BasicInOutTest {
private SwitchYardTestHelper helper;
@Test
public void test_New_Way() {
Message responseMsg = helper.newInvoker("BasicOrderManagementService.createOrder").
sendInOut(new OrderRequest("D123", "ABCD"));
OrderResponse response = (OrderResponse) responseMsg.getContent();
Assert.assertEquals("D123", response.orderId);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment