public void test_copy() { CharNumProperty foo = new CharNumProperty(1.3m), bar = foo.copy(); Assert.IsFalse(ReferenceEquals(foo, bar)); Assert.AreEqual(foo.value, bar.value); }
public void test_equals() { CharNumProperty foo = new CharNumProperty(1.3m), bar = foo.copy(), baz = new CharNumProperty(42); Assert.IsTrue(foo.equals(bar)); Assert.IsTrue(bar.equals(foo)); Assert.IsFalse(foo.equals(baz)); Assert.IsFalse(baz.equals(foo)); }