Ejemplo n.º 1
0
        public void Shouldnt_be_possible_get_an_operation_code_from_a_null_command_line()
        {
            MockRepository mocks = new MockRepository();
            var fakeView = mocks.DynamicMock<IMainView>();
            var fakeModel = mocks.DynamicMock<IMainModel>();

            Expect.Call(delegate { fakeView.ShowMessage(null); }).IgnoreArguments();

            var fakePresenter = new MainPresenter(fakeView, fakeModel);
            fakePresenter.PrepareOptions(null);
            Assert.AreEqual(Operation.Error, fakePresenter.CheckParameters());
        }
Ejemplo n.º 2
0
        public void Shouldnt_be_possible_get_an_operation_code_from_a_null_command_line()
        {
            MockRepository mocks     = new MockRepository();
            var            fakeView  = mocks.DynamicMock <IMainView>();
            var            fakeModel = mocks.DynamicMock <IMainModel>();

            Expect.Call(delegate { fakeView.ShowMessage(null); }).IgnoreArguments();

            var fakePresenter = new MainPresenter(fakeView, fakeModel);

            fakePresenter.PrepareOptions(null);
            Assert.AreEqual(Operation.Error, fakePresenter.CheckParameters());
        }