예제 #1
0
        public ActionResult Index()
        {
            var wk = _workoutService.CurrentWorkout();

            if (wk != null)
            {
                var summary = _viewFactory.Load(wk.WorkoutId);
                return(View(summary));
            }
            else
            {
                return(View("PromptForNew"));
            }
        }
예제 #2
0
 public void ThenViewFactoryThrowsAnExceptionOnAttemptToLoadDifferentPage()
 {
     Assert.Throws <ZukiniAssertionException>(() => _viewFactory.Load <MissingFakePage>());
 }
예제 #3
0
        public PartialViewResult _Summary()
        {
            IList <Workout> model = _workoutViewFactory.Load(_idProvider.UserId()).OrderByDescending(x => x.StartDate).ToList();

            return(PartialView(model));
        }
예제 #4
0
 public PartialViewResult CardioList()
 {
     return(PartialView(_viewFactory.Load(ExerciseType.Cardio)));
 }
예제 #5
0
 public YouTubeComponent FindPlayerByTitle(string frameTitle)
 {
     return(_viewFactory.Load(() => new YouTubeComponent(_.FindFrame(frameTitle))));
 }