Exemplo n.º 1
0
        public void ModelWithIdentificationNumberAttribute_InvalidModel_ReturnsExpectedResults()
        {
            // Arrange
            var model = new ModelWithIdentificationNumberAttribute
            {
                IdentificationNumber = "12345678"
            };

            // Act
            var result = ModelValidator.Validate(model);

            // Assert
            AssertIsNotValid(result, nameof(model.IdentificationNumber), typeof(IdentificationNumberAttribute), ValidationType.IdentificationNumber);
        }
Exemplo n.º 2
0
        public void ModelWithIdentificationNumberAttribute_ValidModel_ReturnsExpectedResults()
        {
            // Arrange
            var model = new ModelWithIdentificationNumberAttribute
            {
                IdentificationNumber = "68636938"
            };

            // Act
            var result = ModelValidator.Validate(model);

            // Assert
            AssertIsValid(result);
        }