Ejemplo n.º 1
0
 public void CallsOverloadWithOneArg()
 {
     var command = new UsesOverloads();
     _mocks.ClassUnderTest.Run(command, Args("a"));
     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(1, command.Calls[0].Args.Count, "number of arguments to the call");
     Assert.AreEqual("a", command.Calls[0].Args[0], "arg[0] to the call");
 }
Ejemplo n.º 2
0
 public void CallsOverloadWithOneArg()
 {
     var command = new UsesOverloads();
     var args = Args("a");
     _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);
 }
Ejemplo n.º 3
0
        public void CallsOverloadWithTwoArgs()
        {
            var command = new UsesOverloads();
            var args    = Args("a", "b");

            _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 CallsOverloadWithOneArg()
        {
            var command = new UsesOverloads();

            _mocks.ClassUnderTest.Run(command, Args("a"));
            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(1, command.Calls[0].Args.Count, "number of arguments to the call");
            Assert.AreEqual("a", command.Calls[0].Args[0], "arg[0] to the call");
        }