public void ShowCommand_WillExecuteChangeTypeCommand_Always()
        {
            bool calledChangeTypeCommand = false;
            var vm = new MainViewModel();
            vm.SetWaitIndicator(new Mock<WaitIndicator>().Object);
            vm.InitWithGuiTypes(new List<string>() { "A.a", "B.b", "C.c" });
            var spyCommand = new Mock<ICommand>();
            spyCommand.Setup(c => c.Execute("A.a")).Callback(() => calledChangeTypeCommand = true);
            vm.ChangeTypeCommand = spyCommand.Object;

            vm.ListOfSelectedAssemblyTypes[0].ShowCommand.Execute("A.a");

            Assert.IsTrue(calledChangeTypeCommand);
        }
        public void ShowCommand_WillCloseWaitIndicator_AfterChangeTypeCommandFinished()
        {
            bool calledWaitIndicatorEnd = false;
            var spyWaitIndicator = new Mock<WaitIndicator>();
            spyWaitIndicator.Setup(w => w.EndWaiting()).Callback(() => calledWaitIndicatorEnd = true);
            var vm = new MainViewModel();
            vm.SetWaitIndicator(spyWaitIndicator.Object);
            vm.InitWithGuiTypes(new List<string>() { "A.a", "B.b", "C.c" });
            var dummyCommand = new Mock<ICommand>();
            vm.ChangeTypeCommand = dummyCommand.Object;

            vm.ListOfSelectedAssemblyTypes[0].ShowCommand.Execute("A.a");

            Assert.IsTrue(calledWaitIndicatorEnd);
        }
        public void ShowCommand_WillDisplayWaitIndicator_Always()
        {
            bool calledWaitIndicatorBegin = false;
            var spyWaitIndicator = new Mock<WaitIndicator>();
            var dummyAppearance = new Mock<IWaitIndicatorAppearance>();
            spyWaitIndicator.Setup(w => w.BeginWaiting(dummyAppearance.Object, 0, 0, 0, 0)).Callback(() => calledWaitIndicatorBegin = true);
            var vm = new MainViewModel();
            vm.PlayButtonWaitIndicatorAppearance = dummyAppearance.Object;
            vm.SetWaitIndicator(spyWaitIndicator.Object);
            vm.InitWithGuiTypes(new List<string>() { "A.a", "B.b", "C.c" });
            var dummyCommand = new Mock<ICommand>();
            vm.ChangeTypeCommand = dummyCommand.Object;

            vm.ListOfSelectedAssemblyTypes[0].ShowCommand.Execute("A.a");

            Assert.IsTrue(calledWaitIndicatorBegin);
        }