Adjust expected exception

Adjust expected exception from IllegalArgumentException to
UnconfirmedOrderException

BAEL-3099
This commit is contained in:
Steven van Beelen 2019-07-19 16:05:39 +02:00
parent 62d1391db5
commit ce364f6b2e
1 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,7 @@ package com.baeldung.axon.commandmodel;
import java.util.UUID;
import com.baeldung.axon.coreapi.exceptions.UnconfirmedOrderException;
import org.axonframework.test.aggregate.AggregateTestFixture;
import org.axonframework.test.aggregate.FixtureConfiguration;
import org.junit.*;
@ -41,12 +42,12 @@ public class OrderAggregateUnitTest {
}
@Test
public void givenOrderPlacedEvent_whenShipOrderCommand_thenShouldThrowIllegalStateException() {
public void givenOrderPlacedEvent_whenShipOrderCommand_thenShouldThrowUnconfirmedOrderException() {
String orderId = UUID.randomUUID().toString();
String product = "Deluxe Chair";
fixture.given(new OrderPlacedEvent(orderId, product))
.when(new ShipOrderCommand(orderId))
.expectException(IllegalStateException.class);
.expectException(UnconfirmedOrderException.class);
}
@Test