public void CallsOverloadOrDefaultWithZeroArgs() { var command = new UsesOverloadsOrDefault(); _mocks.ClassUnderTest.Run(command, Args()); Assert.AreEqual(1, command.Calls.Count, "number of calls to the command"); Assert.AreEqual(TestCommandBase.Form.Split, command.Calls[0].Form, "form of the call"); Assert.AreEqual(0, command.Calls[0].Args.Count, "number of arguments to the call"); }
public void CallsOverloadOrDefaultWithTwoArgs() { var command = new UsesOverloadsOrDefault(); var args = Args("a", "b"); _mocks.ClassUnderTest.Run(command, args); Assert.AreEqual(1, command.Calls.Count, "number of calls to the command"); Assert.AreEqual(TestCommandBase.Form.List, command.Calls[0].Form, "form of the call"); Assert.AreSame(args, command.Calls[0].Args, "arguments to the call"); }
public void CallsOverloadOrDefaultWithZeroArgs() { var command = new UsesOverloadsOrDefault(); var args = Args(); _mocks.ClassUnderTest.Run(command, args); Assert.Equal(1, command.Calls.Count); Assert.Equal(TestCommandBase.Form.Split, command.Calls[0].Form); Assert.Equal(args, command.Calls[0].Args); }
public void CallsOverloadOrDefaultWithTwoArgs() { var command = new UsesOverloadsOrDefault(); var args = Args("a", "b"); _mocks.ClassUnderTest.Run(command, args); Assert.Equal(1, command.Calls.Count); Assert.Equal(TestCommandBase.Form.List, command.Calls[0].Form); Assert.Same(args, command.Calls[0].Args); }
public void CallsOverloadOrDefaultWithOneArg() { var command = new UsesOverloadsOrDefault(); var args = Args("a"); _mocks.ClassUnderTest.Run(command, args); Assert.Single(command.Calls); Assert.Equal(TestCommandBase.Form.Split, command.Calls[0].Form); Assert.Equal(args, command.Calls[0].Args); }