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