From f638fdd24b5b8cbf60f1a53a3d20b32f4c350a40 Mon Sep 17 00:00:00 2001 From: "IETM_FIXE\\ietm6" Date: Mon, 8 Jun 2026 11:11:50 +0200 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20d'un=20test=20unitaire?= =?UTF-8?q?=20qui=20ne=20passait=20plus=20avec=20la=20mise=20=C3=A0=20jour?= =?UTF-8?q?=20pr=C3=A9c=C3=A9dente?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application/campaigncontext/NpcServiceTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/src/test/java/com/loremind/application/campaigncontext/NpcServiceTest.java b/core/src/test/java/com/loremind/application/campaigncontext/NpcServiceTest.java index d33b54e..d21ef9f 100644 --- a/core/src/test/java/com/loremind/application/campaigncontext/NpcServiceTest.java +++ b/core/src/test/java/com/loremind/application/campaigncontext/NpcServiceTest.java @@ -51,7 +51,7 @@ public class NpcServiceTest { Npc result = npcService.createNpc( new NpcService.NpcData("Borin le forgeron", null, null, - Map.of("Notes", "Borin"), null, null, "camp-1", 5)); + Map.of("Notes", "Borin"), null, null, "camp-1", null,5)); assertNotNull(result); ArgumentCaptor captor = ArgumentCaptor.forClass(Npc.class); @@ -67,7 +67,7 @@ public class NpcServiceTest { when(npcRepository.findByCampaignId("camp-1")).thenReturn(List.of(a, b)); when(npcRepository.save(any(Npc.class))).thenReturn(testNpc); - npcService.createNpc(new NpcService.NpcData("Nouveau", null, null, null, null, null, "camp-1", null)); + npcService.createNpc(new NpcService.NpcData("Nouveau", null, null, null, null, null, "camp-1", null,null)); ArgumentCaptor captor = ArgumentCaptor.forClass(Npc.class); verify(npcRepository).save(captor.capture()); @@ -79,7 +79,7 @@ public class NpcServiceTest { when(npcRepository.findByCampaignId("camp-1")).thenReturn(List.of()); when(npcRepository.save(any(Npc.class))).thenReturn(testNpc); - npcService.createNpc(new NpcService.NpcData("Premier", null, null, null, null, null, "camp-1", null)); + npcService.createNpc(new NpcService.NpcData("Premier", null, null, null, null, null, "camp-1", null,null)); ArgumentCaptor captor = ArgumentCaptor.forClass(Npc.class); verify(npcRepository).save(captor.capture()); @@ -124,7 +124,7 @@ public class NpcServiceTest { Npc result = npcService.updateNpc("npc-1", new NpcService.NpcData("Borin renommé", null, null, - Map.of("Notes", "v2"), null, null, "camp-1", 7)); + Map.of("Notes", "v2"), null, null, "camp-1", null,7)); assertEquals("Borin renommé", result.getName()); assertEquals("v2", result.getValues().get("Notes")); @@ -138,7 +138,7 @@ public class NpcServiceTest { Npc result = npcService.updateNpc("npc-1", new NpcService.NpcData("Borin", null, null, - Map.of("Notes", "txt"), null, null, "camp-1", null)); + Map.of("Notes", "txt"), null, null, "camp-1", null,null)); // testNpc avait order=1 → préservé assertEquals(1, result.getOrder()); @@ -150,7 +150,7 @@ public class NpcServiceTest { IllegalArgumentException ex = assertThrows(IllegalArgumentException.class, () -> npcService.updateNpc("missing", - new NpcService.NpcData("x", null, null, null, null, null, "camp-1", null))); + new NpcService.NpcData("x", null, null, null, null, null, "camp-1", null,null))); assertTrue(ex.getMessage().contains("missing")); verify(npcRepository, never()).save(any()); }