From 29141ac7aa9d1b000bd95904907e76d60d0bd78e Mon Sep 17 00:00:00 2001 From: fdai7430 Date: Sat, 28 Jan 2023 19:29:52 +0100 Subject: [PATCH] Optimized tests --- .../java/org/bitbiome/commands/UseCommandTest.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/test/java/org/bitbiome/commands/UseCommandTest.java b/src/test/java/org/bitbiome/commands/UseCommandTest.java index 04fdf71..267de3f 100644 --- a/src/test/java/org/bitbiome/commands/UseCommandTest.java +++ b/src/test/java/org/bitbiome/commands/UseCommandTest.java @@ -45,14 +45,10 @@ public class UseCommandTest { assertEquals("That item is not in your inventory.", com.getUseMessage("Fell", engine)); engine.getPlayer().addToInventory(new Item("Fell", false, 0)); assertEquals("You can't attack with this.", com.getUseMessage("Fell", engine)); - engine.getPlayer().addToInventory(new Item("Sword", true, 10)); - assertEquals("You used Sword on yourself", com.getUseMessage("Sword", engine)); - assertEquals("That target is not available.", com.getUseMessage("Sword on Wolf", engine)); - engine.getPlayer().getLocation().getMobList().add(new Mob("Wolf", false, 11, 10)); - assertEquals("You used Sword on Wolf", com.getUseMessage("Sword on Wolf", engine)); - assertEquals("You killed Wolf with Sword", com.getUseMessage("Sword on Wolf", engine)); - assertEquals("That target is not available.", com.getUseMessage("Sword on Wolf", engine)); engine.getPlayer().addToInventory(new Item("Heiliges Schwert der Erzengel", true, 3000)); - assertEquals("You used Heiliges Schwert der Erzengel on yourself and died.", com.getUseMessage("Heiliges Schwert der Erzengel", engine)); + assertEquals("That target is not available.", com.getUseMessage("Heiliges Schwert der Erzengel on Wolf", engine)); + engine.getPlayer().getLocation().getMobList().add(new Mob("Wolf", false, 11, 10)); + assertEquals("You killed Wolf with Heiliges Schwert der Erzengel", com.getUseMessage("Heiliges Schwert der Erzengel on Wolf", engine)); + assertEquals("That target is not available.", com.getUseMessage("Heiliges Schwert der Erzengel on Wolf", engine)); } }