Example #1
0
        protected override void setUp()
        {
            ThereIsAPreviousResultForTheTest();
            Services.PartialMockTheClassUnderTest();

            ThePresenter.Expect(x => x.ChangeModeTo(Mode.Results));
            ThePresenter.Start();
        }
Example #2
0
        public void do_nothing_if_it_is_not_the_correct_test()
        {
            ThePresenter.Expect(x => x.ChangeModeTo(Mode.Results)).Repeat.Never();

            ThePresenter.Handle(new TestRunEvent(new Test("different test"), TestState.NotQueued)
            {
                Completed = true
            });

            ThePresenter.AssertWasNotCalled(x => x.ChangeModeTo(Mode.Results));
        }
Example #3
0
        protected override void setUp()
        {
            ThereIsNoPreviousResultForTheTest();
            theTest.IsEmpty().ShouldBeTrue();

            Services.PartialMockTheClassUnderTest();

            ThePresenter.Expect(x => x.ChangeModeTo(Mode.Preview));

            ThePresenter.Start();
        }
Example #4
0
        protected override void setUp()
        {
            ThereIsNoPreviousResultForTheTest();
            theTest.Add(new Section("something"));

            Services.PartialMockTheClassUnderTest();

            ThePresenter.Expect(x => x.ChangeModeTo(Mode.Preview));

            ThePresenter.Start();
        }
Example #5
0
        public void show_results_if_the_correct_test()
        {
            ThePresenter.Expect(x => x.ChangeModeTo(Mode.Results));

            ThePresenter.Handle(new TestRunEvent(theTest, TestState.NotQueued)
            {
                Completed = true
            });

            MockFor <ITestView>().Expect(x => x.MarkNotExecuting());

            ThePresenter.AssertWasCalled(x => x.ChangeModeTo(Mode.Results));
        }