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)); }
public void equalsで名前が異なるオブジェクトを比較するとfalseが返る() { //setUp var sut = new RrA("name", 10, new Ip("192.168.0.1")); var expected = false; //exercise var actual = sut.Equals(new RrA("other", 10, new Ip("192.168.0.1"))); //verify Assert.That(actual, Is.EqualTo(expected)); }
public void equalsでDnsTYpeが異なるオブジェクトを比較するとfalseが返る() { //setUp var sut = new RrA("name", 10, new Ip("0.0.0.1")); var expected = false; //exercise var actual = sut.Equals(new RrAaaa("name", 10, new Ip("::1"))); //verify Assert.That(actual, Is.EqualTo(expected)); }