コード例 #1
0
        public void TimedExercise_CustomName_UsesCustomName()
        {
            var pushups = new BodyWeightExercise("Pushups", 5, 20);
            var timed   = new TimedExercise(pushups, new TimeSpan(0, 1, 0), "BestEver");

            Assert.AreEqual("BestEver", timed.Name);
        }
コード例 #2
0
        public void TimedExercise_CheckDefaults_HappyPath()
        {
            var pushups = new BodyWeightExercise("Pushups", 5, 20);
            var timed   = new TimedExercise(pushups, new TimeSpan(0, 1, 0));

            Assert.AreEqual("Timed Pushups", timed.Name);
            Assert.AreEqual(1, timed.Time.Minutes);
            Assert.AreEqual(pushups, timed.Exercise);
        }
コード例 #3
0
        public void TimedExercise_NullExerciseWithCustomName_UseCustomName()
        {
            var timed = new TimedExercise(null, new TimeSpan(0, 1, 0), "Custom");

            Assert.AreEqual("Custom", timed.Name);
        }
コード例 #4
0
        public void TimedExercise_NullExercise_UseDefaults()
        {
            var timed = new TimedExercise(null, new TimeSpan(0, 1, 0));

            Assert.AreEqual("Timed Exercise", timed.Name);
        }