Package be.seeseemelk.mockbukkit.command
Class CommandResult
java.lang.Object
be.seeseemelk.mockbukkit.command.CommandResult
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAsserts if the returned code of the executed command is notfalse.voidAsserts if more messages have been sent to the command sender.voidassertResponse(String message) Assets if the given message was not the next message send to the command sender.voidassertResponse(String format, Object... objects) Asserts if a given formatted message was not the next message sent to the command sender.voidAsserts if the returned code of the executed command is nottrue.booleanCheck if the command executed successfully.
-
Constructor Details
-
CommandResult
-
-
Method Details
-
hasSucceeded
public boolean hasSucceeded()Check if the command executed successfully.- Returns:
trueif the command executed successfully,falseif a problem occured.
-
assertSucceeded
public void assertSucceeded()Asserts if the returned code of the executed command is nottrue. -
assertFailed
public void assertFailed()Asserts if the returned code of the executed command is notfalse. -
assertResponse
Assets if the given message was not the next message send to the command sender.- Parameters:
message- The message to check for.
-
assertResponse
Asserts if a given formatted message was not the next message sent to the command sender.- Parameters:
format- The formatted message to check for.objects- The objects to place into the formatted message.
-
assertNoResponse
public void assertNoResponse()Asserts if more messages have been sent to the command sender.
-