Skip to content

Commit

Permalink
Add additional failure tests for variadic commands
Browse files Browse the repository at this point in the history
  • Loading branch information
desplesda committed May 23, 2024
1 parent d67e1e5 commit cef12f6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Tests/Runtime/DialogueRunnerTests/DialogueRunnerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,18 @@ public void HandleCommand_DispatchesCommandsWithVariadicParameters(string comman

Assert.AreEqual(CommandDispatchResult.StatusType.Succeeded, result.Status);
}
[TestCase("testInstanceVariadic DialogueRunner 1 one")]
[TestCase("testInstanceVariadic DialogueRunner 1 true too")]
[TestCase("testStaticVariadic 1 one")]
[TestCase("testStaticVariadic 1 true too")]
public void HandleCommand_InvalidVariadicParameters_ShouldFail(string command)
{
var dispatcher = runner.CommandDispatcher;

var result = dispatcher.DispatchCommand(command, runner);

Assert.AreEqual(CommandDispatchResult.StatusType.InvalidParameter, result.Status);
}

[Test]
public void AddCommandHandler_RegistersCommands()
Expand Down

0 comments on commit cef12f6

Please sign in to comment.