示例#1
0
        public void test_copy()
        {
            CharNumProperty foo = new CharNumProperty(1.3m), bar = foo.copy();

            Assert.IsFalse(ReferenceEquals(foo, bar));
            Assert.AreEqual(foo.value, bar.value);
        }
示例#2
0
        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));
        }