public void TestUnequalObjects_does_not_throw_exception_when_objects_equal() { var obj1 = new MethodSignature(typeof(int), typeof(string)); var obj2 = new MethodSignature(typeof(int), typeof(string)); Assert.Throws <InvalidOperationException>(() => EqualityTester.TestUnequalObjects(obj1, obj2)); }
public void TestUnequalObjects_throws_exception_when_objects_not_equal() { var obj1 = new MethodSignature(typeof(int), typeof(string)); var obj2 = new MethodSignature(typeof(DateTime), typeof(decimal)); EqualityTester.TestUnequalObjects(obj1, obj2); }
public void Equality_override_works() { var item1 = new MethodSignature(typeof(int), typeof(string)); var item2 = new MethodSignature(typeof(int), typeof(string)); var item3 = new MethodSignature(typeof(DateTime), typeof(decimal)); EqualityTester.TestEqualObjects(item1, item2); EqualityTester.TestUnequalObjects(item2, item3); EqualityTester.TestAgainstNull(item3); }
public void TestUnequalObjects_throws_exception_if_obj2_null() { Assert.Throws <ArgumentNullException>(() => EqualityTester.TestUnequalObjects(obj1: new TestType(), obj2: null)); }