Example #1
0
        public void WeightedExercise_NegativeInputs_UseDefault()
        {
            var exercise = new WeightedExercise("Squats", -5, -20, -225, -5);

            Assert.AreEqual(0, exercise.Sets);
            Assert.AreEqual(0, exercise.Reps);
            Assert.AreEqual(0, exercise.StartingWeight);
            Assert.AreEqual(-5, exercise.WeightIncrements);
        }
Example #2
0
        public void WeightedExercise_MiddleConstructor_HappyPath()
        {
            var middle = new WeightedExercise("Squats", 5, 5, 225);

            Assert.AreEqual("Squats", middle.Name);
            Assert.AreEqual(5, middle.Sets);
            Assert.AreEqual(5, middle.Reps);
            Assert.AreEqual(225, middle.StartingWeight);
            Assert.AreEqual(0, middle.WeightIncrements);
        }
Example #3
0
        public void WeightedExercise_LargeConstructor_HappyPath()
        {
            var large = new WeightedExercise("Squats", 5, 5, 225, 5);

            Assert.AreEqual("Squats", large.Name);
            Assert.AreEqual(5, large.Sets);
            Assert.AreEqual(5, large.Reps);
            Assert.AreEqual(225, large.StartingWeight);
            Assert.AreEqual(5, large.WeightIncrements);
        }
Example #4
0
        public void WeightedExercise_SmallConstructor_HappyPath()
        {
            var small = new WeightedExercise("Squats", 5, 5);

            Assert.AreEqual("Squats", small.Name);
            Assert.AreEqual(5, small.Sets);
            Assert.AreEqual(5, small.Reps);
            Assert.AreEqual(0, small.StartingWeight);
            Assert.AreEqual(0, small.WeightIncrements);
        }
Example #5
0
        public void WeightedExercise_NullName_UseDefault()
        {
            var exe = new WeightedExercise(null, 5, 5, 225);

            Assert.AreEqual("Nameless Weighted Exercise", exe.Name);
        }