public void TestEquals() { Assert.False(_sample.Equals(new AggregateRootSample())); Assert.True(_sample.Equals(_sample2), "1"); Assert.True(_sample == _sample2, "2"); Assert.False(_sample != _sample2, "3"); Assert.False(_sample == _sample3, "4"); Assert.True(_sample4 == _sample5, "5"); Assert.True(_sample4.Equals(_sample5), "6"); Assert.False(_sample6 == _sample7, "7"); Assert.False(_sample6.Equals(_sample7), "8"); }
public void Test_Equals_Null() { Assert.False(_sample.Equals(null)); Assert.False(_sample == null); Assert.False(null == _sample); Assert.True(_sample != null); _sample2 = null; Assert.False(_sample.Equals(_sample2)); _sample = null; Assert.True(_sample == _sample2); Assert.True(_sample2 == _sample); }