示例#1
0
        public void TheAddTreadMillMethod()
        {
            var commandInvoker = Substitute.For<ICommandInvoker>();
            var controller = new CardioController(null, commandInvoker);
            var inModel = new TreadmillViewModel();

            controller.AddTreadmill(inModel);
            commandInvoker.Received(1).Execute(Arg.Is<AddCardioCommand>(x => x.ToAdd.Equals(inModel)));
        }
示例#2
0
 public ActionResult AddTreadmill(TreadmillViewModel inModel)
 {
     return AddCardio(inModel);
 }