Esempio n. 1
0
        public void owner_first_name_is_empty()
        {
            var request = new CreateAppointment
            {
                OwnerFirstName = string.Empty
            };

            var sut = new CreateAppointmentValidator();

            sut.ShouldHaveValidationErrorFor(p => p.OwnerFirstName, request);
        }
Esempio n. 2
0
        public void owner_first_name_is_longer_than_100_characters()
        {
            var request = new CreateAppointment
            {
                OwnerFirstName = new string('x', 101)
            };

            var sut = new CreateAppointmentValidator();

            sut.ShouldHaveValidationErrorFor(p => p.OwnerFirstName, request);
        }
Esempio n. 3
0
        public void reason_for_visit_is_longer_than_1000_characters()
        {
            var request = new CreateAppointment
            {
                ReasonForVisit = new string('x', 1001)
            };

            var sut = new CreateAppointmentValidator();

            sut.ShouldHaveValidationErrorFor(p => p.ReasonForVisit, request);
        }
Esempio n. 4
0
        public void desired_date_is_in_the_past()
        {
            var request = new CreateAppointment
            {
                DesiredDate = DateTimeOffset.UtcNow.AddDays(-1)
            };

            var sut = new CreateAppointmentValidator();

            sut.ShouldHaveValidationErrorFor(p => p.DesiredDate, request);
        }
Esempio n. 5
0
        public void pet_breed_is_empty()
        {
            var request = new CreateAppointment
            {
                PetBreed = string.Empty
            };

            var sut = new CreateAppointmentValidator();

            sut.ShouldHaveValidationErrorFor(p => p.PetBreed, request);
        }
Esempio n. 6
0
        public void pet_breed_is_longer_than_100_characters()
        {
            var request = new CreateAppointment
            {
                PetBreed = new string('x', 101)
            };

            var sut = new CreateAppointmentValidator();

            sut.ShouldHaveValidationErrorFor(p => p.PetBreed, request);
        }
Esempio n. 7
0
        public void reason_for_visit_is_empty()
        {
            var request = new CreateAppointment
            {
                ReasonForVisit = string.Empty
            };

            var sut = new CreateAppointmentValidator();

            sut.ShouldHaveValidationErrorFor(p => p.ReasonForVisit, request);
        }
Esempio n. 8
0
        public void pet_name_is_null()
        {
            var request = new CreateAppointment
            {
                PetName = null
            };

            var sut = new CreateAppointmentValidator();

            sut.ShouldHaveValidationErrorFor(p => p.PetName, request);
        }
Esempio n. 9
0
        public void owner_phone_is_longer_than_25_characters()
        {
            var request = new CreateAppointment
            {
                OwnerPhone = new string('x', 26)
            };

            var sut = new CreateAppointmentValidator();

            sut.ShouldHaveValidationErrorFor(p => p.OwnerPhone, request);
        }
Esempio n. 10
0
        public void owner_phone_is_null()
        {
            var request = new CreateAppointment
            {
                OwnerPhone = null
            };

            var sut = new CreateAppointmentValidator();

            sut.ShouldHaveValidationErrorFor(p => p.OwnerPhone, request);
        }
Esempio n. 11
0
        public void owner_email_is_empty()
        {
            var request = new CreateAppointment
            {
                OwnerEmail = string.Empty
            };

            var sut = new CreateAppointmentValidator();

            sut.ShouldHaveValidationErrorFor(p => p.OwnerEmail, request);
        }