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

            return(result);
        }
コード例 #6
0
ファイル: Conformist.cs プロジェクト: Rophuine/Conventional
        internal static ConventionResult EnforceConformance(ConventionResult result)
        {
            if (ConventionConfiguration.DefaultFailureAssertionCallback != null)
            {
                new[] { result }.WithFailureAssertion(ConventionConfiguration.DefaultFailureAssertionCallback);
            }

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