public FailResult(CaseExecution execution) { Case = execution.Case; Output = execution.Output; Duration = execution.Duration; Exceptions = execution.Exceptions; }
public Fixture(Type testClass, object instance, CaseBehavior caseExecutionBehavior, CaseExecution[] caseExecutions) { TestClass = testClass; Instance = instance; CaseExecutionBehavior = caseExecutionBehavior; CaseExecutions = caseExecutions; }
private void CommitBeforeTestCase(CaseExecution caseexecution, object instance, Action innerbehavior) { var session = _container.GetInstance<ISession>(); session.Flush(); session.Clear(); innerbehavior(); }
public FailResult(CaseExecution execution, AssertionLibraryFilter filter) { Case = execution.Case; Output = execution.Output; Duration = execution.Duration; Exceptions = execution.Exceptions; ExceptionSummary = new ExceptionInfo(Exceptions, filter); }
public override void Execute(object instance, CaseExecution caseExecution) { try { throw new ArgumentException("This parameterized test could not be executed, because no input values were available."); } catch (Exception exception) { caseExecution.Fail(exception); } }
private void TestCaseWrapper(CaseExecution caseExecution, object instance, Action innerbehavior) { var attr = caseExecution.Case.Method.GetCustomAttribute<FeatureAttribute>(true); if (attr != null) { var writer = GetWriter(attr.ReferenceAssembly); writer.Write(caseExecution.Case); } innerbehavior(); }
public virtual void Execute(object instance, CaseExecution caseExecution) { try { bool isDeclaredAsync = Method.IsAsync(); if (isDeclaredAsync && Method.IsVoid()) { ThrowForUnsupportedAsyncVoid(); } object result; try { result = Method.Invoke(instance, parameters); } catch (TargetInvocationException exception) { throw new PreservedException(exception.InnerException); } if (isDeclaredAsync) { var task = (Task)result; try { task.Wait(); } catch (AggregateException exception) { throw new PreservedException(exception.InnerExceptions.First()); } } } catch (Exception exception) { caseExecution.Fail(exception); } }
public virtual void Execute(object instance, CaseExecution caseExecution) { try { bool isDeclaredAsync = Method.IsAsync(); if (isDeclaredAsync && Method.IsVoid()) ThrowForUnsupportedAsyncVoid(); object result; try { result = Method.Invoke(instance, parameters); } catch (TargetInvocationException exception) { throw new PreservedException(exception.InnerException); } if (isDeclaredAsync) { var task = (Task)result; try { task.Wait(); } catch (AggregateException exception) { throw new PreservedException(exception.InnerExceptions.First()); } } } catch (Exception exception) { caseExecution.Fail(exception); } }
public PassResult(CaseExecution execution) { Case = execution.Case; Output = execution.Output; Duration = execution.Duration; }
public void Execute(CaseExecution caseExecution, object instance) { caseBehavior.Execute(caseExecution, instance); }
public ClassExecution(ExecutionPlan executionPlan, Type testClass, CaseExecution[] caseExecutions) { ExecutionPlan = executionPlan; TestClass = testClass; CaseExecutions = caseExecutions; }