コード例 #1
0
		public void SameObjectReferenceIsEqual(TestObject obj)
		{
			var objRefCopy = obj;

			var equal = obj.EqualsFromComponents(objRefCopy);

			equal.Should().BeTrue();
		}
コード例 #2
0
		public void DifferentObjectSameComponentsEqual(String strVal, int intVal, object objVal)
		{
			var testObj1 = new TestObject(strVal, intVal, objVal);
			var testObj2 = new TestObject(strVal, intVal, objVal);

			var equal = testObj1.EqualsFromComponents(testObj2);

			testObj1.Should().NotBeSameAs(testObj2);
			equal.Should().BeTrue();
		}
コード例 #3
0
		public void DifferentObjectNotEqual(TestObject obj1, TestObject obj2)
		{
			var equal = obj1.EqualsFromComponents(obj2);

			equal.Should().BeFalse();
		}