public void TestCanDeriveHostAndOverrideEquals() { DerivedFromHost h1 = new DerivedFromHost { opaque_ref = "hello" }; DerivedFromHost h2 = new DerivedFromHost { opaque_ref = "hello" }; Assert.IsFalse(h1.Equals(h2)); object hh1 = h1; object hh2 = h2; Assert.IsFalse(hh1.Equals(hh2)); IEquatable <Host> hhh1 = h1; IEquatable <Host> hhh2 = h2; Assert.IsFalse(hhh1.Equals(hhh2)); }
public void TestCanDeriveHostAndOverrideEquals() { DerivedFromHost h1 = new DerivedFromHost { opaque_ref = "hello" }; DerivedFromHost h2 = new DerivedFromHost { opaque_ref = "hello" }; Assert.IsFalse(h1.Equals(h2)); object hh1 = h1; object hh2 = h2; Assert.IsFalse(hh1.Equals(hh2)); IEquatable<Host> hhh1 = h1; IEquatable<Host> hhh2 = h2; Assert.IsFalse(hhh1.Equals(hhh2)); }