Skip to content

Commit ce364f6

Browse files
committed
Adjust expected exception
Adjust expected exception from IllegalArgumentException to UnconfirmedOrderException BAEL-3099
1 parent 62d1391 commit ce364f6

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

axon/src/test/java/com/baeldung/axon/commandmodel/OrderAggregateUnitTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import java.util.UUID;
44

5+
import com.baeldung.axon.coreapi.exceptions.UnconfirmedOrderException;
56
import org.axonframework.test.aggregate.AggregateTestFixture;
67
import org.axonframework.test.aggregate.FixtureConfiguration;
78
import org.junit.*;
@@ -41,12 +42,12 @@ public void givenOrderPlacedEvent_whenConfirmOrderCommand_thenShouldPublishOrder
4142
}
4243

4344
@Test
44-
public void givenOrderPlacedEvent_whenShipOrderCommand_thenShouldThrowIllegalStateException() {
45+
public void givenOrderPlacedEvent_whenShipOrderCommand_thenShouldThrowUnconfirmedOrderException() {
4546
String orderId = UUID.randomUUID().toString();
4647
String product = "Deluxe Chair";
4748
fixture.given(new OrderPlacedEvent(orderId, product))
4849
.when(new ShipOrderCommand(orderId))
49-
.expectException(IllegalStateException.class);
50+
.expectException(UnconfirmedOrderException.class);
5051
}
5152

5253
@Test

0 commit comments

Comments
 (0)