private static FileFontConfiguration CreateFileFontConfigurationOnlyDriveWithFile()
        {
            FakeExplorerTreeViewModel stubExplorerTreeVM = CreateFakeExplorerTreeVM();

            FakeDriveItemViewModel mockDriveItemVM = new FakeDriveItemViewModel();

            mockDriveItemVM.CreateAddAndGetFakeFile("FakeFile");
            stubExplorerTreeVM.Drives.Clear(); // cleare because for this tests we need special fakeExplorerTree.
            stubExplorerTreeVM.Drives.Add(mockDriveItemVM);

            return(new FileFontConfiguration(stubExplorerTreeVM));
        }
        public void ShowHiddenElements_FilePropertyNameIsDummyChild_DirectoriesAndFilesAreNotUpdated()
        {
            FakeExplorerTreeViewModel fakeExplorerTreeVM = CreateFakeExplorerTreeVM();
            FakeDriveItemViewModel    mockDriveItemVM    = new FakeDriveItemViewModel();

            mockDriveItemVM.CreateAddAndGetFakeFile("FakeFile").Name = "DummyChild";
            fakeExplorerTreeVM.Drives.Clear();
            fakeExplorerTreeVM.Drives.Add(mockDriveItemVM);
            HiddenOverallConfiguration hiddenOverallConfiguration = CreateHiddenOverallConfiguration(fakeExplorerTreeVM);

            Assert.AreEqual(false, hiddenOverallConfiguration.ShowHiddenElements, "Initial value should be false but was true!");
            hiddenOverallConfiguration.ShowHiddenElements = true;

            Assert.AreEqual(false, (mockDriveItemVM.ChildTreeItemVMs.First() as FakeFileItemViewModel).SetVisibilityAccordingToConfigurationWasCalled);
        }
        public void SetSmallIconToActiveIcon_FilePropertyNameIsDummyChild_ForeachDirectorySetSmallImageSourceToActiveImageSourceWasNotCalled()
        {
            FakeExplorerTreeViewModel stubExplorerTreeVM = CreateFakeExplorerTreeVM();
            FakeDriveItemViewModel    mockDriveItemVM    = new FakeDriveItemViewModel();

            mockDriveItemVM.CreateAddAndGetFakeFile("FakeFile").Name = "DummyChild";
            stubExplorerTreeVM.Drives.Clear(); // cleare because for this test we need special fakeExplorerTree.
            stubExplorerTreeVM.Drives.Add(mockDriveItemVM);
            FileIconConfiguration fileIconConfiguration = CreateFileIconConfigurationWithVariableExplorerTreeVM(stubExplorerTreeVM);


            fileIconConfiguration.SetSmallIconToActiveIcon();


            foreach (var mockDrive in stubExplorerTreeVM.Drives)
            {
                Assert.AreEqual(false, (mockDrive.ChildTreeItemVMs.First().IconVM as FakeIconViewModel).ActiveImageSourceWasSetToSmallImageSource);
            }
        }
        public void ForeachDriveUpdateChilds_DrivePropertyNameIsDummyChild_FontVmUpdateWasNotCalled()
        {
            FakeExplorerTreeViewModel stubExplorerTreeVM = CreateFakeExplorerTreeVM();
            FakeDriveItemViewModel    mockDriveItemVM    = new FakeDriveItemViewModel();

            mockDriveItemVM.Name = "DummyChild";
            mockDriveItemVM.CreateAddAndGetFakeFile("FakeFile");
            stubExplorerTreeVM.Drives.Clear(); // cleare because for this test we need special fakeExplorerTree.
            stubExplorerTreeVM.Drives.Add(mockDriveItemVM);
            FileFontConfiguration fileFontConfiguration = new FileFontConfiguration(stubExplorerTreeVM);


            fileFontConfiguration.ForeachDriveUpdateChilds();


            foreach (var mockDrive in stubExplorerTreeVM.Drives)
            {
                Assert.AreEqual(false, (mockDrive.ChildTreeItemVMs.First().FontVM as FakeFontViewModel).UpdateWasCalled);
            }
        }