protected override void setUp() { ThePresenter.Handle(new TestRunEvent(new Test("another test"), TestState.NotQueued) { Completed = true }); }
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)); }
public void the_available_view_states_should_be() { ThePresenter.Handle(new TestRunEvent(theTest, TestState.NotQueued) { Completed = true }); ThePresenter.Modes[Mode.Edit].CanExecute(null).ShouldBeTrue(); ThePresenter.Modes[Mode.Preview].CanExecute(null).ShouldBeTrue(); ThePresenter.Modes[Mode.Results].CanExecute(null).ShouldBeFalse(); ThePresenter.Modes[Mode.Xml].CanExecute(null).ShouldBeTrue(); }
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)); }
public void should_change_the_status_on_the_view_to_executing_if_it_is_the_correct_test() { ThePresenter.Handle(new TestRunEvent(theTest, TestState.Executing)); MockFor <ITestView>().AssertWasCalled(x => x.MarkAsExecuting()); }
public void do_nothing_if_it_is_a_different_test() { ThePresenter.Handle(new TestRunEvent(new Test("different test"), TestState.Executing)); MockFor <ITestView>().AssertWasNotCalled(x => x.MarkAsExecuting()); }
public void update_the_view_if_the_test_matches() { ThePresenter.Handle(new TestRunEvent(theTest, TestState.NotQueued)); MockFor <ITestHeaderViewModel>().AssertWasCalled(x => x.Update()); }
public void do_nothing_if_the_test_does_not_match() { ThePresenter.Handle(new TestRunEvent(new Test("other test"), TestState.NotQueued)); MockFor <ITestHeaderViewModel>().AssertWasNotCalled(x => x.Update()); }
public void update_the_view_if_it_is_the_correct_test() { ThePresenter.Handle(new TestRunEvent(theTest, TestState.Queued)); MockFor <ITestHeaderViewModel>().AssertWasCalled(x => x.Update()); }
public void do_nothing_if_it_is_a_different_test() { ThePresenter.Handle(new TestRunEvent(new Test("some other test"), TestState.Queued)); MockFor <ITestHeaderViewModel>().AssertWasNotCalled(x => x.Update()); }