public void equalsでnullトを比較するとfalseが返る() { //setUp var sut = new RrA("name", 10, new Ip("192.168.0.1")); var expected = false; //exercise var actual = sut.Equals(null); //verify Assert.That(actual, Is.EqualTo(expected)); }
public void equalsでTTLが異なるオブジェクトを比較するとfalseが返る() { //setUp var sut = new RrA("name", 10, new Ip("0.0.0.1")); var expected = false; //exercise var actual = sut.Equals(new RrA("name", 20, new Ip("0.0.0.1"))); //verify Assert.That(actual, Is.EqualTo(expected)); }
public void equalsで同一のオブジェクトを比較するとtrueが返る() { //setUp var sut = new RrA("name", 10, new Ip("192.168.0.1")); var expected = true; //exercise var actual = sut.Equals(sut); //verify Assert.That(actual, Is.EqualTo(expected)); }