예제 #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}");
         }
     }
 }