@Test public void testExecute_reserveBooks_Success() throws Exception { ReservationRequestMessage reservationRequestMessage = Bookshop2Fixture.create_ReservationRequestMessage(); setupContext("dummyCorrelationId", "dummyTransactionId"); setupMessage(reservationRequestMessage); runTestExecute_reserveBooks(reservationRequestMessage); }
@Test public void testExecute_reserveBooks_EmptyCorrelationId() throws Exception { setupForExpectedException(ReservationAbortedException.class, "CorrelationId empty"); ReservationRequestMessage reservationRequestMessage = Bookshop2Fixture.create_ReservationRequestMessage(); setupContext("", "dummyTransactionId"); setupMessage(reservationRequestMessage); isExpectedValidationError = true; runTestExecute_reserveBooks(reservationRequestMessage); }
@Test public void testExecute_reserveBooks_NullTransactionId() throws Exception { setupForExpectedException(ReservationAbortedException.class, "TransactionId null"); ReservationRequestMessage reservationRequestMessage = Bookshop2Fixture.create_ReservationRequestMessage(); setupContext("dummyCorrelationId", null); setupMessage(reservationRequestMessage); setGlobalTransactionActive(true); isExpectedValidationError = true; runTestExecute_reserveBooks(reservationRequestMessage); }