public void Validate_Identity_type_of_guid_with_generated_guid_validation_should_be_valid() { var propertyName = "GuidId"; var target = new IdentityValidationRule(propertyName); var businessObject = new TestEntity() { GuidId = Guid.NewGuid() }; Assert.IsTrue(target.Validate(businessObject)); }
public void Validate_Identity_type_of_guid_with_empty_guid_validation_should_be_invalid() { var propertyName = "GuidId"; var target = new IdentityValidationRule(propertyName); var businessObject = new TestEntity() { GuidId = Guid.Empty }; Assert.IsFalse(target.Validate(businessObject)); }
public void Validate_Identity_type_of_integer_with_0_value_validation_should_be_valid() { var propertyName = "IntId"; var target = new IdentityValidationRule(propertyName); var businessObject = new TestEntity() { IntId = 10 }; Assert.IsTrue(target.Validate(businessObject)); }