public void Equals_DoesNotMatchNull() { // Arrange var birthNumber = new BirthNumber("910725/6444"); // Act var result = birthNumber.Equals(null); // Arrange Assert.That(result, Is.False); }
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)); }
public void Equals_DoesMatchItself() { // Arrange var birthNumber = new BirthNumber("910725/6444"); // Act var result = birthNumber.Equals(birthNumber); // Arrange Assert.That(result, Is.True); }
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); }