Ejemplo n.º 1
0
        public void ValidateDayNotGreateThan31()
        {
            var template = new MonthlyScheduleTemplate(1);

            template.DayNumber = 32;

            var errors = template.Validate();

            errors.Should().BeEquivalentTo(new string[] { "Day number must be between 1 and 31" });
        }
Ejemplo n.º 2
0
        public void ValidateEveryNotLessThanZero()
        {
            var template = new MonthlyScheduleTemplate(-1);

            template.OccuranceType = OccuranceType.DayOfWeek;

            var errors = template.Validate();

            errors.Should().BeEquivalentTo(new string[] { "Monthly schedule must occur atleast every 1 months" });
        }
Ejemplo n.º 3
0
        public void ValidateEveryNotLessThanZero()
        {
            var template = new MonthlyScheduleTemplate(-1);

            var errors = template.Validate();

            errors.Should().BeEquivalentTo(new string[]
            {
                "Monthly schedule must occur atleast every 1 months",
                "Day number must be between 1 and 31"
            });
        }