protected override void setUp() { ThereIsAPreviousResultForTheTest(); Services.PartialMockTheClassUnderTest(); ThePresenter.Expect(x => x.ChangeModeTo(Mode.Results)); ThePresenter.Start(); }
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)); }
protected override void setUp() { ThereIsNoPreviousResultForTheTest(); theTest.IsEmpty().ShouldBeTrue(); Services.PartialMockTheClassUnderTest(); ThePresenter.Expect(x => x.ChangeModeTo(Mode.Preview)); ThePresenter.Start(); }
protected override void setUp() { ThereIsNoPreviousResultForTheTest(); theTest.Add(new Section("something")); Services.PartialMockTheClassUnderTest(); ThePresenter.Expect(x => x.ChangeModeTo(Mode.Preview)); ThePresenter.Start(); }
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)); }