コード例 #1
0
		public void comparing_two_instances_with_different_enum_values_should_fail()
		{
			var obj1 = new TestClass4 { Value1 = TestValues.TestValue1 };
			var obj2 = new TestClass4 { Value1 = TestValues.TestValue2 };

			Assert.Throws< AssertionException >( () => obj1.should_be_equal_to( obj2 ) );
		}
コード例 #2
0
		public void comparing_two_instances_with_the_same_enum_value_should_pass()
		{
			var obj1 = new TestClass4 { Value1 = TestValues.TestValue1 };
			var obj2 = new TestClass4 { Value1 = TestValues.TestValue1 };

			obj1.should_be_equal_to( obj2 );
		}