public void Test_Create_BookingRentalModel(BookingRentalModel bookingRental) { var validationContext = new ValidationContext(bookingRental); var actual = Validator.TryValidateObject(bookingRental, validationContext, null, true); Assert.True(actual); }
public void Test_Validate_BookingRentalModel(BookingRentalModel bookingRental) { var validationContext = new ValidationContext(bookingRental); Assert.Empty(bookingRental.Validate(validationContext)); }