コード例 #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" });
        }
コード例 #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" });
        }
コード例 #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"
            });
        }