コード例 #1
0
        public void ComputeCheckDigit_WhenValidNumber_ReturnsExpectedValue(string number, int expectedValue, bool bornBefore2000)
        {
            // Act
            var checkDigit = BelgianSocialSecurityNumber.ComputeCheckDigit(number, bornBefore2000);

            // Assert
            checkDigit.Should().Be(expectedValue);
        }
コード例 #2
0
        public void Birthdate_WhenValidNumber_ReturnsExpectedValue(BelgianSocialSecurityNumber socialSecurityNumber, DateTime?expectedValue)
        {
            // Act
            var birthdate = socialSecurityNumber.Birthdate();

            // Assert
            birthdate.Should().Be(expectedValue);
        }
コード例 #3
0
        public void BirthYear_WhenValidNumber_ReturnsExpectedValue(string number, int?expectedValue)
        {
            // Arrange
            var socialSecurityNumber = new BelgianSocialSecurityNumber(number);
            // Act
            var year = socialSecurityNumber.BirthYear();

            // Assert
            year.Should().Be(expectedValue);
        }
コード例 #4
0
        public void SexAtBirth_WhenValidNumber_ReturnsExpectedValue(string number, BelgianSocialSecurityNumber.Sex expectedValue)
        {
            // Arrange
            var socialSecurityNumber = new BelgianSocialSecurityNumber(number);
            // Act
            var sexAtBirth = socialSecurityNumber.SexAtBirth();

            // Assert
            sexAtBirth.Should().Be(expectedValue);
        }
コード例 #5
0
        public void SequenceNumber_WhenValidNumber_ReturnsExpectedValue(string number, int expectedValue)
        {
            // Arrange
            var socialSecurityNumber = new BelgianSocialSecurityNumber(number);
            // Act
            var sequenceNumber = socialSecurityNumber.SequenceNumber();

            // Assert
            sequenceNumber.Should().Be(expectedValue);
        }
コード例 #6
0
        public void PersonUniqueIdentifier_WhenValidNumber_ReturnsExpectedValue(string number, int expectedValue)
        {
            // Arrange
            var socialSecurityNumber = new BelgianSocialSecurityNumber(number);
            // Act
            var uniqueIdentifier = socialSecurityNumber.PersonUniqueIdentifier();

            // Assert
            uniqueIdentifier.Should().Be(expectedValue);
        }
コード例 #7
0
        public void IsNationalRegisterNumber_WhenValidNumber_ReturnsExpectedValue(string number, bool expectedValue)
        {
            // Arrange
            var socialSecurityNumber = new BelgianSocialSecurityNumber(number);
            // Act
            var isNationalRegisterNumber = socialSecurityNumber.IsNationalRegisterNumber();

            // Assert
            isNationalRegisterNumber.Should().Be(expectedValue);
        }
コード例 #8
0
        public void HasUnknownBirthdate_WhenValidNumber_ReturnsExpectedValue(string number, bool expectedValue)
        {
            // Arrange
            var socialSecurityNumber = new BelgianSocialSecurityNumber(number);
            // Act
            var hasUnknownBirthdate = socialSecurityNumber.HasUnknownBirthdate();

            // Assert
            hasUnknownBirthdate.Should().Be(expectedValue);
        }
コード例 #9
0
        public void CheckDigit_WhenValidNumber_ReturnsExpectedValue(string number, int expectedValue)
        {
            // Arrange
            var socialSecurityNumber = new BelgianSocialSecurityNumber(number);
            // Act
            var checkDigit = socialSecurityNumber.CheckDigit();

            // Assert
            checkDigit.Should().Be(expectedValue);
        }
コード例 #10
0
        public void BornBefore2000_WhenValidNumber_ReturnsExpectedValue(string number, bool expectedValue)
        {
            // Arrange
            var socialSecurityNumber = new BelgianSocialSecurityNumber(number);
            // Act
            var bornBeforeValue = socialSecurityNumber.BornBefore2000();

            // Assert
            bornBeforeValue.Should().Be(expectedValue);
        }