예제 #1
0
        public void GetRatingsTests_C()
        {
            // No gym. But walked long distance, no sofa, fruit and veggies (skipping either brings it down to 2, both to 1), is a rating of 4.

            var oneDay = new OneDay(DateTime.Now);

            // Exercise
            oneDay.SetAnswer(0, false);
            oneDay.SetAnswer(1, false);
            oneDay.SetAnswer(2, false);

            // Stegraknare, No Sofa
            oneDay.SetAnswer(3, true);
            oneDay.SetAnswer(4, true);

            // Fruit, Veggies
            oneDay.SetAnswer(5, true);
            oneDay.SetAnswer(6, true);

            // Dessert, Snacks
            oneDay.SetAnswer(7, false);
            oneDay.SetAnswer(8, false);

            Assert.Equal(4, oneDay.GetRating());
        }
예제 #2
0
        public void GetRatingsTests_B()
        {
            // Homegym with a longer walk or atleast not slacking in Sofa, and fruit/veggies is a rating of 5

            var oneDay = new OneDay(DateTime.Now);

            // Exercise
            oneDay.SetAnswer(0, false);
            oneDay.SetAnswer(1, false);
            oneDay.SetAnswer(2, true);

            // Stegraknare, No Sofa
            oneDay.SetAnswer(3, false);
            oneDay.SetAnswer(4, true);

            // Fruit, Veggies
            oneDay.SetAnswer(5, true);
            oneDay.SetAnswer(6, false);

            // Dessert, Snacks
            oneDay.SetAnswer(7, false);
            oneDay.SetAnswer(8, false);

            Assert.Equal(5, oneDay.GetRating());
        }
예제 #3
0
        public void GetRatingsTests_H()
        {
            // Gym, no walk, sofa, and one fruit. 5 points. 4 without the fruit.

            var oneDay = new OneDay(DateTime.Now);

            // Exercise
            oneDay.SetAnswer(0, false);
            oneDay.SetAnswer(1, true);
            oneDay.SetAnswer(2, false);

            // Stegraknare, No Sofa
            oneDay.SetAnswer(3, false);
            oneDay.SetAnswer(4, false);

            // Fruit, Veggies
            oneDay.SetAnswer(5, true);
            oneDay.SetAnswer(6, false);

            // Dessert, Snacks
            oneDay.SetAnswer(7, false);
            oneDay.SetAnswer(8, false);

            Assert.Equal(5, oneDay.GetRating());
        }
예제 #4
0
        public void GetRatingsTests_F()
        {
            // Cross fit. Didnt walk long distance, and slacking in Sofa. Eat a fruit. 5 points (even without the fruit).

            var oneDay = new OneDay(DateTime.Now);

            // Exercise
            oneDay.SetAnswer(0, true);
            oneDay.SetAnswer(1, false);
            oneDay.SetAnswer(2, false);

            // Stegraknare, No Sofa
            oneDay.SetAnswer(3, false);
            oneDay.SetAnswer(4, false);

            // Fruit, Veggies
            oneDay.SetAnswer(5, true);
            oneDay.SetAnswer(6, false);

            // Dessert, Snacks
            oneDay.SetAnswer(7, false);
            oneDay.SetAnswer(8, false);

            Assert.Equal(5, oneDay.GetRating());
        }
예제 #5
0
        public void GetRatingsTests_D()
        {
            // No gym. But walked long distance, fruit and veggies, but also slacking in sofa, rating of 2.
            // No gym. Walked long distance, no sofa, fruit and veggies is a rating of 4.

            var oneDay = new OneDay(DateTime.Now);

            // Exercise
            oneDay.SetAnswer(0, false);
            oneDay.SetAnswer(1, false);
            oneDay.SetAnswer(2, false);

            // Stegraknare, No Sofa
            oneDay.SetAnswer(3, true);
            oneDay.SetAnswer(4, true);

            // Fruit, Veggies
            oneDay.SetAnswer(5, true);
            oneDay.SetAnswer(6, true);

            // Dessert, Snacks
            oneDay.SetAnswer(7, false);
            oneDay.SetAnswer(8, false);

            Assert.Equal(4, oneDay.GetRating());
        }
예제 #6
0
        public void GetRatingTypicalDayThree()
        {
            var oneDay = new OneDay(DateTime.Now);

            // Exercise
            oneDay.SetAnswer(0, false);
            oneDay.SetAnswer(1, false);
            oneDay.SetAnswer(2, false);

            // Stegraknare, No Sofa
            oneDay.SetAnswer(3, true);
            oneDay.SetAnswer(4, true);

            // Fruit, Veggies
            oneDay.SetAnswer(5, true);
            oneDay.SetAnswer(6, true);

            // Dessert, Snacks
            oneDay.SetAnswer(7, true);
            oneDay.SetAnswer(8, false);

            Assert.Equal(2, oneDay.GetRating());
        }