public static void DoesNotThrow(Action action, string message, ConstraintsViolations errors)
 {
     try
     {
         action();
     }
     catch (Exception e)
     {
         errors.Add(message + ", but instead caught: " + e);
     }
 }
        internal static void TypeAdheresTo(IEnumerable <IConstraint> constraints)
        {
            var violations = ConstraintsViolations.Empty();

            foreach (var constraint in constraints)
            {
                RecordedAssertions.DoesNotThrow(() => constraint.CheckAndRecord(violations),
                                                "Did not expect exception", violations);
            }

            violations.AssertNone();
        }
 public static void Equal <T>(T i, T i2, string message, ConstraintsViolations errors)
 {
     True(Equals(i, i2), message, errors);
 }
 public static void False(bool condition, string message, ConstraintsViolations errors)
 {
     True(!condition, message, errors);
 }