From 241117a6a65b95bfcee9bd4b784d344f635a78f9 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 18 Feb 2023 12:13:20 +0100 Subject: [PATCH] Fix test --- testsrc/de/steamwar/command/PartOfCommand.java | 4 ++-- testsrc/de/steamwar/command/PartOfCommandTest.java | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/testsrc/de/steamwar/command/PartOfCommand.java b/testsrc/de/steamwar/command/PartOfCommand.java index 4f2fe9a..9c66a4b 100644 --- a/testsrc/de/steamwar/command/PartOfCommand.java +++ b/testsrc/de/steamwar/command/PartOfCommand.java @@ -44,7 +44,7 @@ public class PartOfCommand { return new TestTypeMapper() { @Override public Integer map(String sender, PreviousArguments previousArguments, String s) { - return Integer.parseInt(s); + return -1; } @Override @@ -64,7 +64,7 @@ public class PartOfCommand { @Register public void execute(String s, @Mapper("test") int i) { - throw new ExecutionIdentifier("SubCommand with int"); + throw new ExecutionIdentifier("SubCommand with int " + i); } } } diff --git a/testsrc/de/steamwar/command/PartOfCommandTest.java b/testsrc/de/steamwar/command/PartOfCommandTest.java index b02614a..726384e 100644 --- a/testsrc/de/steamwar/command/PartOfCommandTest.java +++ b/testsrc/de/steamwar/command/PartOfCommandTest.java @@ -36,8 +36,7 @@ public class PartOfCommandTest { command.execute("test", "", new String[]{"0"}); assertThat(true, is(false)); } catch (Exception e) { - e.printStackTrace(); - assertCMDFramework(e, ExecutionIdentifier.class, "SubCommand with int"); + assertCMDFramework(e, ExecutionIdentifier.class, "SubCommand with int -1"); } } }