Exemple #1
0
 public void SetUp()
 {
     Matcher     = new InstanceOfTypeConstraint(typeof(D1));
     GoodValues  = new object[] { new D1(), new D2() };
     BadValues   = new object[] { new B() };
     Description = "instance of <NUnit.Framework.Constraints.Tests.D1>";
 }
 public void SetUp()
 {
     Matcher = new InstanceOfTypeConstraint(typeof(D1));
     GoodValues = new object[] { new D1(), new D2() };
     BadValues = new object[] { new B() };
     Description = "instance of <NUnit.Framework.Constraints.Tests.D1>";
 }
        static ConstraintResult GetTypeCheckResult <TActual>(TActual actual)
        {
            var constraint = new InstanceOfTypeConstraint(typeof(PersistenceTestResult));
            var result     = constraint.ApplyTo(actual);

            if (result?.IsSuccess == true)
            {
                return(null);
            }
            return(result);
        }
 public void SetUp()
 {
     theConstraint = new InstanceOfTypeConstraint(typeof(D1));
     expectedDescription = string.Format("instance of <{0}>", typeof(D1));
     stringRepresentation = string.Format("<instanceof {0}>", typeof(D1));
 }
 public void SetUp()
 {
     theConstraint        = new InstanceOfTypeConstraint(typeof(D1));
     expectedDescription  = string.Format("instance of <{0}>", typeof(D1));
     stringRepresentation = string.Format("<instanceof {0}>", typeof(D1));
 }