From 27476598002976354c91660f41a3e17170a8bbf6 Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Mon, 1 Jun 2026 17:19:41 +0200 Subject: [PATCH] test(loader): cover unknown consume id rejection --- .../jeanluc/adventure/loader/CombinationFactoryTest.java | 9 +++++++++ 1 file changed, 9 insertions(+) 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"); + } }