diff --git a/Semesterprojekt/src/test/java/thb/jeanluc/adventure/loader/CombinationFactoryTest.java b/Semesterprojekt/src/test/java/thb/jeanluc/adventure/loader/CombinationFactoryTest.java index 88db084..61cd55c 100644 --- a/Semesterprojekt/src/test/java/thb/jeanluc/adventure/loader/CombinationFactoryTest.java +++ b/Semesterprojekt/src/test/java/thb/jeanluc/adventure/loader/CombinationFactoryTest.java @@ -49,4 +49,13 @@ class CombinationFactoryTest { .isInstanceOf(WorldLoadException.class) .hasMessageContaining("phantom"); } + + @Test + void rejectsUnknownConsumeId() { + CombinationDto dto = new CombinationDto("matches", "torch", null, + List.of("matches", "wraith"), null, null, "x", null); + assertThatThrownBy(() -> CombinationFactory.fromDto(dto, items())) + .isInstanceOf(WorldLoadException.class) + .hasMessageContaining("wraith"); + } }