Exemple #1
0
        public void MustCloseWindowWhenTerminating()
        {
            var window = new Mock <IWindow>();
            var sut    = new AboutNotification(appConfig.Object, text.Object, uiFactory.Object);

            uiFactory.Setup(u => u.CreateAboutWindow(It.IsAny <AppConfig>())).Returns(window.Object);

            sut.Activate();
            sut.Terminate();

            window.Verify(w => w.Close());
        }
Exemple #2
0
        public void MustNotFailToTerminateIfNotStarted()
        {
            var sut = new AboutNotification(appConfig.Object, text.Object, uiFactory.Object);

            sut.Terminate();
        }