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