public void PropertySet_ActualAttributes_GreaterThan() { var expected = new TestObjectActualValidationAttributes { IdGreaterThanZero = 5 }; var actual = new TestObjectActualValidationAttributes { IdGreaterThanZero = 5, IdNotNull = new object() }; Assert.That(actual, Entity.EqualTo(expected)); }
public void PropertySet_ActualAttributes_NotNull_Failure() { var expected = new TestObjectActualValidationAttributes { IdGreaterThanZero = 5 }; var actual = new TestObjectActualValidationAttributes { IdGreaterThanZero = 5 }; var messageCheck = new MessageCheck("Property Set is not equal"); messageCheck.AddPropertyLine("Not Null", "Null", "IdNotNull"); var ex = Assert.Throws(typeof(AssertionFailedException), () => Assert.That(actual, Entity.EqualTo(expected))); messageCheck.Check(ex); }
public void PropertySet_ActualAttributes_GreaterThan_Edge_Failure() { var expected = new TestObjectActualValidationAttributes { IdGreaterThanZero = 0 }; var actual = new TestObjectActualValidationAttributes { IdGreaterThanZero = 0, IdNotNull = new object() }; var messageCheck = new MessageCheck("Property Set is not equal"); messageCheck.AddPropertyLine("Greater than 0", "0", "IdGreaterThanZero"); var ex = Assert.Throws(typeof(AssertionException), () => Assert.That(actual, Entity.Is.EqualTo(expected))); messageCheck.Check(ex); }