public void UpdateWeeklyWorkout()
        {
            //Arrange
            var saveInstance = new WeeklyWorkout()
            {
                Name     = "TestWeekly",
                DayOne   = _testDailyWorkout,
                DayTwo   = _testDailyWorkout,
                DayThree = _testDailyWorkout,
                DayFour  = _testDailyWorkout,
                DayFive  = _testDailyWorkout,
                DaySix   = _testDailyWorkout,
                DaySeven = _testDailyWorkout,
            };

            _testWorkout = _weeklyWorkoutService.InsertWeeklyWorkout(saveInstance, _testUser);

            //Act
            _testWorkout.Name = "Ultra kemény királyság";
            _weeklyWorkoutService.UpdateWeeklyWorkout(_testWorkout.Id, _testWorkout);

            //Assert
            Assert.AreEqual(_weeklyWorkoutService.GetWeeklyWorkout(_testWorkout.Id, _testUser).Name,
                            "Ultra kemény királyság");
        }
Exemplo n.º 2
0
 public IActionResult GetDailyWorkout(int id)
 {
     return(Ok(_weeklyWorkoutService.GetWeeklyWorkout(id, _user)));
 }