public void SetSmallIconToActiveIcon_SetPropertyActiveIconStateToLargeIcon_ReturnsSetValue() { DriveIconConfiguration driveIconConfiguration = CreateDefaultDriveIconConfiguration(); driveIconConfiguration.SetSmallIconToActiveIcon(); Assert.AreEqual(IconStates.SmallIcon, driveIconConfiguration.ActiveIconState); }
public void SetSmallIconToActiveIcon_ForeachDriveUpdateChildsWithLargeIcon_ForeachDirectorySetSmallImageSourceToActiveImageSourceWasCalled() { DriveIconConfiguration driveIconConfiguration = CreateDefaultDriveIconConfiguration(); driveIconConfiguration.SetSmallIconToActiveIcon(); foreach (var mockDrive in driveIconConfiguration.ExplorerTreeVM.Drives) { Assert.AreEqual(true, (mockDrive.IconVM as FakeIconViewModel).ActiveImageSourceWasSetToSmallImageSource, "The fakePath of the item whose " + nameof(mockDrive.IconVM.SetSmallImageSourceToActiveImageSource) + "-Method was not called is: " + mockDrive.Name); } }
public void SetSmallIconToActiveIcon_DrivePropertyNameIsDummyChild_ForeachDirectorySetSmallImageSourceToActiveImageSourceWasNotCalled() { FakeExplorerTreeViewModel stubExplorerTreeVM = CreateFakeExplorerTreeVM(); FakeDriveItemViewModel mockDriveItemVM = new FakeDriveItemViewModel(); mockDriveItemVM.Name = "DummyChild"; stubExplorerTreeVM.Drives.Clear(); // cleare because for this test we need special fakeExplorerTree. stubExplorerTreeVM.Drives.Add(mockDriveItemVM); DriveIconConfiguration driveIconConfiguration = CreateDriveIconConfigurationWithVariableExplorerTreeVM(stubExplorerTreeVM); driveIconConfiguration.SetSmallIconToActiveIcon(); foreach (var mockDrive in stubExplorerTreeVM.Drives) { Assert.AreEqual(false, (mockDrive.IconVM as FakeIconViewModel).ActiveImageSourceWasSetToSmallImageSource); } }