Exemple #1
0
        public void ValidateEveryHourNotLessThanZero()
        {
            var template = new HourlyScheduleTemplate(-1);

            var errors = template.Validate();

            errors.Should().BeEquivalentTo(new string[] { "Time must be less than 1 day" });
        }
Exemple #2
0
        public void ValidateFromTimeLessThanToTime()
        {
            var template = new HourlyScheduleTemplate(1);

            template.From(17, 00);
            template.To(9, 00);

            var errors = template.Validate();

            errors.Should().BeEquivalentTo(new string[] { "From time must be earlier than To Time" });
        }