Example #1
0
        public void TheAddBikeMethod()
        {
            var commandInvoker = Substitute.For<ICommandInvoker>();
            var controller = new CardioController(null, commandInvoker);
            var inModel = new BikeViewModel();

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