public void SetCaloriesToHealtcareActivitySuccessfully() { HealthcareActivity healthcareActivity = new HealthcareActivity(); healthcareActivity.Calories = 300; int calories = healthcareActivity.Calories; Assert.Equal(300, calories); }
public void SetWeightToHealtcareActivitySuccessfully() { HealthcareActivity healthcareActivity = new HealthcareActivity(); healthcareActivity.Weight = 80; double kilograms = healthcareActivity.Weight; Assert.Equal(80, kilograms); }
public void SetWaterIntakeToHealtcareActivitySuccessfully() { HealthcareActivity healthcareActivity = new HealthcareActivity(); healthcareActivity.WaterIntake = 2000; double litres = healthcareActivity.WaterIntake; Assert.Equal(2000, litres); }
public HealthcareActivityViewModel GetActivityViewModel(HealthcareActivity healthcareActivity) { return(new HealthcareActivityViewModel { BloodPressure = healthcareActivity.BloodPressure, Date = healthcareActivity.Date, Calories = healthcareActivity.Calories, Id = healthcareActivity.Id, WaterIntake = healthcareActivity.WaterIntake, Weight = healthcareActivity.Weight }); }
public HealthcareActivityViewModel GetActivityViewModel(HealthcareActivity healthcareActivity) { return(new HealthcareActivityViewModel { HoursSlept = healthcareActivity.HoursSlept, Date = healthcareActivity.Date, Calories = healthcareActivity.Calories, Id = healthcareActivity.Id, WaterIntake = healthcareActivity.WaterIntake, Weight = healthcareActivity.Weight }); }
public void SetSleepToHealtcareActivitySuccessfully() { HealthcareActivity healthcareActivity = new HealthcareActivity(); DateTime date1 = new DateTime(2010, 1, 1, 8, 0, 15); DateTime date2 = new DateTime(2010, 8, 18, 13, 30, 30); TimeSpan timeSpan = date2 - date1; healthcareActivity.BedHour = date1; healthcareActivity.WakeHour = date2; TimeSpan hoursSlept = healthcareActivity.HoursSlept; TimeSpan expected = new TimeSpan(229, 05, 30, 15); Assert.Equal(expected, hoursSlept); }