protected override void setUp() { ThePresenter.Handle(new TestRunEvent(new Test("another test"), TestState.NotQueued) { Completed = true }); }
protected override void setUp() { Services.PartialMockTheClassUnderTest(); MockFor <ITestService>().Expect(x => x.CreatePreview(theTest)).Return(theHtml); ThePresenter.ChangeModeTo(Mode.Preview); }
public void update_the_screen_if_the_view_is_in_results_mode() { ThePresenter.SetMode(Mode.Preview); ClassUnderTest.HandleMessage(new ClearResultsMessage()); MockFor <ITestHeaderViewModel>().AssertWasCalled(x => x.Update()); }
protected override void setUp() { ThereIsAPreviousResultForTheTest(); Services.PartialMockTheClassUnderTest(); ThePresenter.Expect(x => x.ChangeModeTo(Mode.Results)); ThePresenter.Start(); }
protected override void setUp() { Services.PartialMockTheClassUnderTest(); MockFor <ITestStateManager>().Expect(x => x.CurrentXml).Return(theXml); ThePresenter.ChangeModeTo(Mode.Xml); }
protected override void beforeEach() { fixture = new FixtureGraph("Math"); Services.Inject <IFixtureNode>(fixture); ThePresenter.Activate(null); }
public void change_to_preview_mode_if_the_view_is_in_results_mode() { ThePresenter.SetMode(Mode.Results); ClassUnderTest.Expect(x => x.ChangeModeTo(Mode.Preview)); ClassUnderTest.HandleMessage(new ClearResultsMessage()); ClassUnderTest.VerifyAllExpectations(); }
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(); }
protected override void setUp() { Services.PartialMockTheClassUnderTest(); theTest.LastResult = new TestResult() { Html = "<html />" }; ThePresenter.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 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()); }
public void the_view_should_be_put_into_the_results_mode() { ThePresenter.AssertWasCalled(x => x.ChangeModeTo(Mode.Results)); }
protected override void setUp() { ThePresenter.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()); }