예제 #1
0
        public void NotThrow_WhenPresenterIsNotIDisposable()
        {
            var mockedPresenter = new Mock <IPresenter>();
            var mockedFactory   = new Mock <IMvpPresenterFactory>();

            var sut = new RememBeer.Business.Logic.MvpPresenterFactory.MvpPresenterFactory(mockedFactory.Object);

            Assert.DoesNotThrow(() => sut.Release(mockedPresenter.Object));
        }
예제 #2
0
        public void CallDisposeOnPassedPresenter()
        {
            var mockedPresenter = new Mock <IDisposablePresenter>();
            var mockedFactory   = new Mock <IMvpPresenterFactory>();

            var sut = new RememBeer.Business.Logic.MvpPresenterFactory.MvpPresenterFactory(mockedFactory.Object);

            sut.Release(mockedPresenter.Object);

            mockedPresenter.Verify(p => p.Dispose(), Times.Once());
        }