public void ExecutesACommandToEnd()
            {
                var service = Substitute.For<IWorkoutService>();
                var invoker = Substitute.For<ICommandInvoker>();
                var controller = new WorkoutController(service, invoker);

                controller.End();

                invoker.Received().ExecuteResult<EndWorkoutCommand, Guid>(Arg.Any<EndWorkoutCommand>());
            }
            public void RedirectsToASummaryPage()
            {
                var id = Guid.NewGuid();
                var service = Substitute.For<IWorkoutService>();
                var invoker = Substitute.For<ICommandInvoker>();
                invoker.ExecuteResult<EndWorkoutCommand, Guid>(Arg.Any<EndWorkoutCommand>()).Returns(id);
                var controller = new WorkoutController(service, invoker);

                RedirectToRouteResult result = (RedirectToRouteResult)controller.End();
                result.RouteValues["id"].ShouldEqual(id);
                result.RouteValues["action"].ShouldEqual("Index");
                result.RouteValues["controller"].ShouldEqual("Summary");
            }