예제 #1
0
        public void Test_Create_BookingRentalModel(BookingRentalModel bookingRental)
        {
            var validationContext = new ValidationContext(bookingRental);
            var actual            = Validator.TryValidateObject(bookingRental, validationContext, null, true);

            Assert.True(actual);
        }
예제 #2
0
        public void Test_Validate_BookingRentalModel(BookingRentalModel bookingRental)
        {
            var validationContext = new ValidationContext(bookingRental);

            Assert.Empty(bookingRental.Validate(validationContext));
        }