Beispiel #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()
     });
 }
Beispiel #2
0
 public static ConventionResult Not(this ConventionResult left)
 {
     return(new ConventionResult(left.TypeName)
     {
         IsSatisfied = !left.IsSatisfied,
         Failures = left.Failures.ToArray()
     });
 }
Beispiel #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()
     });
 }
 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()
     };
 }
        internal static ConventionResult EnforceConformance(ConventionResult result)
        {
            if (ConventionConfiguration.DefaultFailureAssertionCallback != null)
            {
                new[] { result }.WithFailureAssertion(ConventionConfiguration.DefaultFailureAssertionCallback);
            }

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

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