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))); }
public ActionResult AddTreadmill(TreadmillViewModel inModel) { return AddCardio(inModel); }