@Test public void testExecute_purchaseBooks_Success() throws Exception { PurchaseRequestMessage purchaseRequestMessage = Bookshop2Fixture.create_PurchaseRequestMessage(); setupContext("dummyCorrelationId", "dummyTransactionId"); setupMessage(purchaseRequestMessage); runTestExecute_purchaseBooks(purchaseRequestMessage); }
@Test public void testExecute_purchaseBooks_EmptyCorrelationId() throws Exception { setupForExpectedAssertionFailure("CorrelationId empty"); PurchaseRequestMessage purchaseRequestMessage = Bookshop2Fixture.create_PurchaseRequestMessage(); setupContext("", "dummyTransactionId"); setupMessage(purchaseRequestMessage); isExpectedValidationError = true; runTestExecute_purchaseBooks(purchaseRequestMessage); }
@Test public void testExecute_purchaseBooks_NullTransactionId() throws Exception { setupForExpectedAssertionFailure("TransactionId null"); PurchaseRequestMessage purchaseRequestMessage = Bookshop2Fixture.create_PurchaseRequestMessage(); setupContext("dummyCorrelationId", null); setupMessage(purchaseRequestMessage); setGlobalTransactionActive(true); isExpectedValidationError = true; runTestExecute_purchaseBooks(purchaseRequestMessage); }