Example #1
0
        public static UnityNullConstraint UnityNull(this ConstraintExpression expression)
        {
            var constraint = new UnityNullConstraint();

            expression.Append(constraint);
            return(constraint);
        }
Example #2
0
        public void TestObjectUnityNullConstraint()
        {
            var obj        = CreateDestroyedObject();
            var constraint = new UnityNullConstraint();

            Assert.That(constraint.ApplyTo(obj).IsSuccess, Is.True);
        }
Example #3
0
        public void TestCompareAgainstNormalNullConstraint()
        {
            var obj     = CreateDestroyedObject();
            var result1 = new UnityNullConstraint().ApplyTo(obj).IsSuccess;
            var result2 = new NullConstraint().ApplyTo(obj).IsSuccess;

            Assert.That(result1, Is.Not.EqualTo(result2));
        }