예제 #1
0
        public void TestDropSetInNotOnlyLastSet()
        {
            TrainingPlan plan = new TrainingPlan();

            plan.RestSeconds  = 60;
            plan.Name         = "name";
            plan.Author       = "author";
            plan.TrainingType = TrainingType.Split;
            var day = new TrainingPlanDay();

            day.Name = "day1";
            plan.AddDay(day);
            TrainingPlanEntry entry = new TrainingPlanEntry();

            entry.Exercise = new ExerciseLightDTO()
            {
                GlobalId = new Guid("9934E9E3-50DC-4B34-8B67-092084894740")
            };
            day.AddEntry(entry);
            entry.Sets.Add(new TrainingPlanSerie(10));
            entry.Sets.Add(new TrainingPlanSerie(10));
            var set1 = new TrainingPlanSerie(10);

            set1.DropSet = Service.V2.Model.DropSetType.IIDropSet;
            entry.Sets.Add(set1);
            var set2 = new TrainingPlanSerie(10);

            set2.DropSet = Service.V2.Model.DropSetType.IIDropSet;
            entry.Sets.Add(set2);

            checkSingle(plan, set1, TrainingPlanCheckItemStatus.Information, "TrainingPlan_DropSetInNotOnlyLastSet");
        }
예제 #2
0
        public void TestRepetitionRange_MinMaxEqual_OneNumber()
        {
            TrainingPlanSerie serie = new TrainingPlanSerie();

            serie.FromString("10");
            Assert.AreEqual(10, serie.RepetitionNumberMin.Value);
            Assert.AreEqual(10, serie.RepetitionNumberMax.Value);
        }
예제 #3
0
        public void TestRepetitionRange_MaxOnly()
        {
            TrainingPlanSerie serie = new TrainingPlanSerie();

            serie.FromString("-10");
            Assert.AreEqual(10, serie.RepetitionNumberMax.Value);
            Assert.IsNull(serie.RepetitionNumberMin);
        }
예제 #4
0
        public void TestRepetitionRange_EmptyRange()
        {
            TrainingPlanSerie serie = new TrainingPlanSerie(10, 12);

            serie.FromString(null);
            Assert.AreEqual(null, serie.RepetitionNumberMin);
            Assert.AreEqual(null, serie.RepetitionNumberMax);
        }
예제 #5
0
        public void TestRepetitionRange_MinMax_Wrong()
        {
            TrainingPlanSerie serie = new TrainingPlanSerie();

            serie.FromString("12-10");//min is bigger than max
        }