public void Revert_MustTerminateActivators()
        {
            var activatorMocks = new List <Mock <IActionCenterActivator> >
            {
                new Mock <IActionCenterActivator>(),
                new Mock <IActionCenterActivator>(),
                new Mock <IActionCenterActivator>()
            };

            actionCenterSettings.EnableActionCenter = true;

            foreach (var activator in activatorMocks)
            {
                activators.Add(activator.Object);
            }

            sut.Revert();

            terminationActivator.Verify(t => t.Stop(), Times.Once);

            foreach (var activator in activatorMocks)
            {
                activator.Verify(a => a.Stop(), Times.Once);
            }
        }
Esempio n. 2
0
        public void Revert_MustTerminateActivators()
        {
            var actionCenterActivator = new Mock <IActionCenterActivator>();
            var taskviewActivator     = new Mock <ITaskviewActivator>();
            var terminationActivator  = new Mock <ITerminationActivator>();

            context.Activators.Add(actionCenterActivator.Object);
            context.Activators.Add(taskviewActivator.Object);
            context.Activators.Add(terminationActivator.Object);

            sut.Revert();

            actionCenterActivator.Verify(a => a.Stop(), Times.Once);
            taskviewActivator.Verify(a => a.Stop(), Times.Once);
            terminationActivator.Verify(a => a.Stop(), Times.Once);
        }