public void can_retrieve_its_own_test() { var execution = new SimpleExecutionContext(); var test = new Test("soemthing"); var context = new TestContext(execution, test, new ConsoleListener()); context.Retrieve(typeof (Test)).ShouldBeTheSameAs(test); context.Retrieve<Test>().ShouldBeTheSameAs(test); }
public void store_and_retrieve_backs_up_by_the_system() { var returnValue = new SomethingThatDoesNotExist(); var execution = new SimpleExecutionContext(); execution.Services.Add<ISomethingThatDoesNotExist>(returnValue); var context = new TestContext(execution, new Test("a"), new ConsoleListener()); context.Retrieve(typeof (ISomethingThatDoesNotExist)).ShouldBeTheSameAs(returnValue); context.Retrieve<ISomethingThatDoesNotExist>().ShouldBeTheSameAs(returnValue); }
/// <summary> /// Executes before every single specification run /// </summary> /// <param name="execution"></param> /// <param name="context"></param> public virtual void BeforeEach(SimpleExecutionContext execution, ISpecContext context) { // Nothing }