CommonCore/testsrc/de/steamwar/command/GuardCommandTest.java
2022-04-26 09:04:36 +02:00

34 Zeilen
977 B
Java

package de.steamwar.command;
import de.steamwar.command.dto.ExecutionIdentifier;
import org.junit.Test;
import static de.steamwar.AssertionUtils.assertCMDFramework;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.is;
public class GuardCommandTest {
@Test
public void test() {
GuardCommand cmd = new GuardCommand();
try {
cmd.execute("test", "", new String[0]);
} catch (Exception e) {
assertCMDFramework(e, ExecutionIdentifier.class, "RunTypeMapper");
}
}
@Test
public void testTabComplete() {
GuardCommand cmd = new GuardCommand();
try {
cmd.tabComplete("test", "", new String[]{""});
} catch (Exception e) {
assertThat(e, is(instanceOf(ExecutionIdentifier.class)));
assertThat(e.getMessage(), is("GuardChecker TAB_COMPLETE"));
}
}
}