public void Should_be_able_to_create_validator() { var metadata = new RequiredValidationMetadata(); var validator = metadata.CreateValidator(CreateMetadata(), new ControllerContext()); Assert.NotNull(validator); }
public void Should_not_throw_if_сonventions_is_enabled_but_resurce_is_not_set() { var metadata = new RequiredValidationMetadata(); var validator = metadata.CreateValidator(); Assert.NotNull(validator); }
public void Should_not_throw_if_сonventions_is_enabled_but_resurce_is_not_set() { var metadata = new RequiredValidationMetadata(); var validator = metadata.CreateValidator(CreateMetadata(), new ControllerContext()); Assert.NotNull(validator); Assert.DoesNotThrow(() => validator.GetClientValidationRules()); }