Open asn25 opened 4 years ago
Hi,
consider CreateOrderSagaTests.shouldRejectOrderDueToConsumerVerificationFailed test. If I change parameters of expected Commands to arbitrary values, test still passes:
https://imgur.com/a/3fzgN1v
Would be good to add to SagaUnitTestSupport asserts for Command parameters as well, if possible.
=====
@Test public void shouldRejectOrderDueToConsumerVerificationFailed() { given() .saga(makeCreateOrderSaga(), new CreateOrderSagaState(ORDER_ID, CHICKEN_VINDALOO_ORDER_DETAILS)). expect(). // command(new ValidateOrderByConsumer(CONSUMER_ID, ORDER_ID,CHICKEN_VINDALOO_ORDER_TOTAL)). command(new ValidateOrderByConsumer(55555, 77777, null)). to(ConsumerServiceChannels.consumerServiceChannel). andGiven(). failureReply(). expect(). // command(new RejectOrderCommand(ORDER_ID)). command(new RejectOrderCommand(3333333)). to(OrderServiceChannels.orderServiceChannel). andGiven(). successReply(). expectRolledBack() ; }
===
Test PASSED
Hi,
consider CreateOrderSagaTests.shouldRejectOrderDueToConsumerVerificationFailed test. If I change parameters of expected Commands to arbitrary values, test still passes:
https://imgur.com/a/3fzgN1v
Would be good to add to SagaUnitTestSupport asserts for Command parameters as well, if possible.
=====
@Test public void shouldRejectOrderDueToConsumerVerificationFailed() { given() .saga(makeCreateOrderSaga(), new CreateOrderSagaState(ORDER_ID, CHICKEN_VINDALOO_ORDER_DETAILS)). expect(). // command(new ValidateOrderByConsumer(CONSUMER_ID, ORDER_ID,CHICKEN_VINDALOO_ORDER_TOTAL)). command(new ValidateOrderByConsumer(55555, 77777, null)). to(ConsumerServiceChannels.consumerServiceChannel). andGiven(). failureReply(). expect(). // command(new RejectOrderCommand(ORDER_ID)). command(new RejectOrderCommand(3333333)). to(OrderServiceChannels.orderServiceChannel). andGiven(). successReply(). expectRolledBack() ; }
===
Test PASSED