protected override void InitPresenter()
 {
     MainView = (IMainView)View;
     MainView.MainPresenter = this;
     if (FirstPresenter == null)
     {
         throw new InvalidOperationException();
     }
     if (SecondPresenter == null)
     {
         throw new InvalidOperationException();
     }
     FirstPresenter.View = MainView.FirstView;
     FirstPresenter.Init();
     SecondPresenter.View = MainView.SecondView;
     SecondPresenter.Init();
 }
        public void SunnyDay()
        {
            //Arrange
            FirstPresenter  firstPresenter  = new FirstPresenter();
            SecondPresenter secondPresenter = new SecondPresenter();
            var             mockFirstView   = MockRepository.GenerateStub <IFirstView>();
            var             mockSecondView  = MockRepository.GenerateStub <ISecondView>();
            var             mockMainView    = MockRepository.GenerateStub <IMainView>();

            mockMainView.Stub(m => m.FirstView).Return(mockFirstView);
            mockMainView.Stub(m => m.SecondView).Return(mockSecondView);

            //Act
            var sut = new MainPresenter
            {
                FirstPresenter  = firstPresenter,
                SecondPresenter = secondPresenter,
                View            = mockMainView,
            };

            sut.Init();

            //Assert
            Assert.That(firstPresenter.View, Is.SameAs(mockFirstView));
            Assert.That(firstPresenter.FirstView, Is.SameAs(mockFirstView));
            Assert.That(secondPresenter.View, Is.SameAs(mockSecondView));
            Assert.That(secondPresenter.SecondView, Is.SameAs(mockSecondView));
            Assert.That(sut.View, Is.SameAs(mockMainView));
            Assert.That(sut.MainView, Is.SameAs(mockMainView));

            Assert.That(mockFirstView.Presenter, Is.SameAs(firstPresenter));
            Assert.That(mockFirstView.FirstPresenter, Is.SameAs(firstPresenter));
            Assert.That(mockSecondView.Presenter, Is.SameAs(secondPresenter));
            Assert.That(mockSecondView.SecondPresenter, Is.SameAs(secondPresenter));
            Assert.That(mockMainView.Presenter, Is.SameAs(sut));
            Assert.That(mockMainView.MainPresenter, Is.SameAs(sut));
        }