Ejemplo n.º 1
0
        public void CanDeactivateWithNullDataset()
        {
            var project = new Mock <ILinkToProjects>();

            Func <string, IDisposable> timerFunc = s => new MockDisposable();

            var command = new DeactivateDatasetCommand(project.Object, null, timerFunc);

            Assert.IsFalse(command.CanExecute(null));
        }
Ejemplo n.º 2
0
        public void CanDeactivateWithDeactivatedDataset()
        {
            var project = new Mock <ILinkToProjects>();

            var proxy = new Mock <IProxyDataset>();
            {
                proxy.Setup(p => p.IsActivated)
                .Returns(false);
            }

            var dataset = new DatasetFacade(proxy.Object);

            Func <string, IDisposable> timerFunc = s => new MockDisposable();

            var command = new DeactivateDatasetCommand(project.Object, dataset, timerFunc);

            Assert.IsFalse(command.CanExecute(null));
        }