protected void Exercise(Example example) { Context.AddExample(example); if(!example.Pending) example.Run(Context); }
public void Exercise(Example example, nspec nspec) { if (example.Pending) { return; } if (contextLevelFailure != null) { example.Exception = contextLevelFailure; return; } try { RunBefores(nspec); RunActs(nspec); example.Run(nspec); Afters(); } catch (TargetInvocationException e) { example.Exception = e.InnerException; } catch (Exception e) { example.Exception = e; } }
protected void Exercise(Example example) { Context.AddExample(example); if (!example.Pending) { example.Run(Context); } }
public void should_be_marked_as_pending_if_parent_context_is_pending() { var context = new Context("pending context", 0, isPending: true); var example = new Example("example name"); context.AddExample(example); example.Run(context); example.Pending.should_be_true(); }
public void Run(Example example, nspec nspec) { if (example.Pending) { return; } try { RunBefores(nspec); RunActs(nspec); example.Run(nspec); Afters(); } catch (Exception e) { example.Exception = e; } }
public void Exercise(Example example, nspec nspec) { if (example.Pending) return; if (contextLevelFailure != null) { example.Exception = contextLevelFailure; return; } try { RunBefores(nspec); RunActs(nspec); example.Run(nspec); Afters(); } catch (TargetInvocationException e) { example.Exception = e.InnerException; } catch (Exception e) { example.Exception = e; } }