コード例 #1
0
ファイル: TestSuite.cs プロジェクト: kalyon/NBi
 private void ExecuteChecks(ConditionXml check)
 {
     foreach (var predicate in check.Predicates)
     {
         var impl       = new DecorationFactory().Get(predicate);
         var isVerified = impl.Validate();
         if (!isVerified)
         {
             Assert.Ignore("This test has been ignored because following check wasn't successful: {0}", impl.Message);
         }
     }
 }
コード例 #2
0
ファイル: TestSuite.cs プロジェクト: jeason0813/NBi
 private void ExecuteChecks(ConditionXml check)
 {
     foreach (var predicate in check.Predicates)
     {
         var impl       = new DecorationFactory().Get(predicate);
         var isVerified = impl.Validate();
         if (!isVerified)
         {
             Trace.WriteLineIf(Extensibility.NBiTraceSwitch.TraceInfo, $"Test ignored. At least one condition was not validated: '{impl.Message}'");
             Assert.Ignore($"This test has been ignored because following check wasn't successful: {impl.Message}");
         }
     }
 }
コード例 #3
0
 private void ValidateConditions(ConditionXml condition, IDictionary <string, ITestVariable> allVariables)
 {
     foreach (var predicate in condition.Predicates)
     {
         var helper     = new ConditionHelper(serviceLocator, allVariables);
         var args       = helper.Execute(predicate);
         var impl       = new DecorationFactory().Instantiate(args);
         var isVerified = impl.Validate();
         if (!isVerified)
         {
             Trace.WriteLineIf(NBiTraceSwitch.TraceInfo, $"Test ignored. At least one condition was not validated: '{impl.Message}'");
             Assert.Ignore($"This test has been ignored because following check wasn't successful: {impl.Message}");
         }
     }
 }