Пример #1
0
        public void MustCloseWindowWhenTerminating()
        {
            var window = new Mock <IWindow>();
            var sut    = new LogNotification(logger.Object, text.Object, uiFactory.Object);

            uiFactory.Setup(u => u.CreateLogWindow(It.IsAny <ILogger>())).Returns(window.Object);

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

            window.Verify(w => w.Close());
        }
Пример #2
0
        public void MustNotFailToTerminateIfNotStarted()
        {
            var sut = new LogNotification(logger.Object, text.Object, uiFactory.Object);

            sut.Terminate();
        }