Class CommandResultResponseMatcher

java.lang.Object
org.hamcrest.BaseMatcher<CommandResult>
org.hamcrest.TypeSafeMatcher<CommandResult>
org.mockbukkit.mockbukkit.matcher.command.CommandResultResponseMatcher
All Implemented Interfaces:
org.hamcrest.Matcher<CommandResult>, org.hamcrest.SelfDescribing

public class CommandResultResponseMatcher extends org.hamcrest.TypeSafeMatcher<CommandResult>
  • Constructor Details

    • CommandResultResponseMatcher

      public CommandResultResponseMatcher(String response)
  • Method Details

    • matchesSafely

      protected boolean matchesSafely(CommandResult commandResult)
      Specified by:
      matchesSafely in class org.hamcrest.TypeSafeMatcher<CommandResult>
    • describeTo

      public void describeTo(org.hamcrest.Description description)
    • describeMismatchSafely

      protected void describeMismatchSafely(CommandResult commandResult, org.hamcrest.Description mismatchDescription)
      Overrides:
      describeMismatchSafely in class org.hamcrest.TypeSafeMatcher<CommandResult>
    • hasResponse

      @NotNull public static @NotNull CommandResultResponseMatcher hasResponse(@NotNull @NotNull String response)
      Parameters:
      response - The response the command result should have
      Returns:
      A matcher which matches with any command result with specified response
    • doesNotHaveResponse

      @NotNull public static @NotNull org.hamcrest.Matcher<CommandResult> doesNotHaveResponse(@NotNull @NotNull String response)
      Parameters:
      response - The response the command result should not have
      Returns:
      A matcher which matches with any command result without specified response