Esempio n. 1
0
 public static ConventionResult Or(this ConventionResult left, ConventionResult right)
 {
     return(new ConventionResult(left.TypeName)
     {
         IsSatisfied = left.IsSatisfied || right.IsSatisfied,
         Failures = left.Failures.Union(right.Failures).ToArray()
     });
 }
Esempio n. 2
0
 public static ConventionResult Not(this ConventionResult left)
 {
     return(new ConventionResult(left.TypeName)
     {
         IsSatisfied = !left.IsSatisfied,
         Failures = left.Failures.ToArray()
     });
 }
Esempio n. 3
0
 public static ConventionResult And(this ConventionResult left, ConventionResult right)
 {
     return(new ConventionResult(left.SubjectName)
     {
         IsSatisfied = left.IsSatisfied && right.IsSatisfied,
         Failures = left.Failures.Union(right.Failures).ToArray()
     });
 }
Esempio n. 4
0
 public static ConventionResult Or(this ConventionResult left, ConventionResult right)
 {
     return new ConventionResult(left.TypeName)
     {
         IsSatisfied = left.IsSatisfied || right.IsSatisfied,
         Failures = left.Failures.Union(right.Failures).ToArray()
     };
 }
Esempio n. 5
0
        internal static ConventionResult EnforceConformance(ConventionResult result)
        {
            if (ConventionConfiguration.DefaultFailureAssertionCallback != null)
            {
                new[] { result }.WithFailureAssertion(ConventionConfiguration.DefaultFailureAssertionCallback);
            }

            return(result);
        }
Esempio n. 6
0
        internal static ConventionResult EnforceConformance(ConventionResult result)
        {
            if (ConventionConfiguration.DefaultFailureAssertionCallback != null)
            {
                new[] { result }.WithFailureAssertion(ConventionConfiguration.DefaultFailureAssertionCallback);
            }

            return result;
        }
Esempio n. 7
0
 public static void WithFailureAssertion(this ConventionResult result, Action <string> failureAssertion)
 {
     new[] { result }.WithFailureAssertion(failureAssertion);
 }