Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 /// <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
 }