Esempio n. 1
0
        public void Equals_DoesNotMatchNull()
        {
            // Arrange
            var birthNumber = new BirthNumber("910725/6444");

            // Act
            var result = birthNumber.Equals(null);

            // Arrange
            Assert.That(result, Is.False);
        }
Esempio n. 2
0
        public void Equals_MatchEqualObject(string firstInput, string secondInput, bool expectedResult)
        {
            // Arrange
            var firstBirthNumber = new BirthNumber(firstInput);
            var secondBirthNumber = new BirthNumber(secondInput);

            // Act
            bool result = firstBirthNumber.Equals(secondBirthNumber);

            // Assert
            Assert.That(result, Is.EqualTo(expectedResult));
        }
Esempio n. 3
0
        public void Equals_DoesMatchItself()
        {
            // Arrange
            var birthNumber = new BirthNumber("910725/6444");

            // Act
            var result = birthNumber.Equals(birthNumber);

            // Arrange
            Assert.That(result, Is.True);
        }
Esempio n. 4
0
        public void Equals_DoesMatchString([Values("910725/6444", "9107256444")] string firstNumber, [Values("910725/6444", "9107256444")] string secondNumber)
        {
            // Arrange
            var birthNumber = new BirthNumber(firstNumber);

            // Act
            var result = birthNumber.Equals(secondNumber);

            // Arrange
            Assert.That(result, Is.True);
        }