public void DriveFontConfiguration_DefaultInitialisation_PropertyFontFamilyIsInstantiated() { FakeExplorerTreeViewModel stubExplorerTreeVM = CreateFakeExplorerTreeVM(); DriveFontConfiguration driveFontConfiguration = new DriveFontConfiguration(stubExplorerTreeVM); Assert.AreEqual(new System.Windows.Media.FontFamily("Times New Roman"), driveFontConfiguration.FontFamily); }
public void DriveFontConfiguration_DefaultInitialisation_PropertyFontWeightIsInitilised() { FakeExplorerTreeViewModel stubExplorerTreeVM = CreateFakeExplorerTreeVM(); DriveFontConfiguration driveFontConfiguration = new DriveFontConfiguration(stubExplorerTreeVM); Assert.AreEqual(FontWeights.Normal, driveFontConfiguration.FontWeight); }
public void DriveFontConfiguration_DefaultInitialisation_PropertyExplorerTreeVMIsInstantiated() { FakeExplorerTreeViewModel mockExplorerTreeVM = CreateFakeExplorerTreeVM(); DriveFontConfiguration driveFontConfiguration = new DriveFontConfiguration(mockExplorerTreeVM); Assert.AreEqual(mockExplorerTreeVM, driveFontConfiguration.ExplorerTreeVM); }
public void FontWeight_SetGet_ReturnsSetValue() { FakeExplorerTreeViewModel stubExplorerTreeVM = CreateFakeExplorerTreeVM(); DriveFontConfiguration driveFontConfiguration = new DriveFontConfiguration(stubExplorerTreeVM); driveFontConfiguration.FontWeight = FontWeights.Black; Assert.AreEqual(FontWeights.Black, driveFontConfiguration.FontWeight); }
public void FontStyle_SetGet_ReturnsSetValue() { FakeExplorerTreeViewModel stubExplorerTreeVM = CreateFakeExplorerTreeVM(); DriveFontConfiguration driveFontConfiguration = new DriveFontConfiguration(stubExplorerTreeVM); driveFontConfiguration.FontStyle = FontStyles.Oblique; Assert.AreEqual(FontStyles.Oblique, driveFontConfiguration.FontStyle); }
public void FontStretch_SetGet_ReturnsSetValue() { FakeExplorerTreeViewModel stubExplorerTreeVM = CreateFakeExplorerTreeVM(); DriveFontConfiguration driveFontConfiguration = new DriveFontConfiguration(stubExplorerTreeVM); driveFontConfiguration.FontStretch = FontStretches.Expanded; Assert.AreEqual(FontStretches.Expanded, driveFontConfiguration.FontStretch); }
public void FontSize_SetGet_ReturnsSetValue() { FakeExplorerTreeViewModel stubExplorerTreeVM = CreateFakeExplorerTreeVM(); DriveFontConfiguration driveFontConfiguration = new DriveFontConfiguration(stubExplorerTreeVM); driveFontConfiguration.FontSize = 500; Assert.AreEqual(500, driveFontConfiguration.FontSize); }
public void FontFamily_SetGet_ReturnsSetValue() { FakeExplorerTreeViewModel stubExplorerTreeVM = CreateFakeExplorerTreeVM(); DriveFontConfiguration driveFontConfiguration = new DriveFontConfiguration(stubExplorerTreeVM); driveFontConfiguration.FontFamily = new System.Windows.Media.FontFamily("Arial"); Assert.AreEqual(new System.Windows.Media.FontFamily("Arial"), driveFontConfiguration.FontFamily); }
public void FontWeight_ForeachDriveUpdateChilds_FontVMUpdateWasCalled() { DriveFontConfiguration driveFontConfiguration = CreateDriveFontConfigurationOnlyDriveWithFile(); driveFontConfiguration.FontWeight = FontWeights.Black; foreach (var mockDrive in driveFontConfiguration.ExplorerTreeVM.Drives) { Assert.AreEqual(true, (mockDrive.FontVM as FakeFontViewModel).UpdateWasCalled); } }
public void FontWeight_SetSameValueAgain_FontVMUpdateWasNotCalled() { DriveFontConfiguration driveFontConfiguration = CreateDriveFontConfigurationOnlyDriveWithFile(); driveFontConfiguration.FontWeight = driveFontConfiguration.FontWeight; foreach (var mockDrive in driveFontConfiguration.ExplorerTreeVM.Drives) { Assert.AreEqual(false, (mockDrive.FontVM as FakeFontViewModel).UpdateWasCalled); } }
public void FontFamily_ForeachDriveUpdateChilds_FontVMUpdateWasCalled() { DriveFontConfiguration driveFontConfiguration = CreateDriveFontConfigurationOnlyDriveWithFile(); driveFontConfiguration.FontFamily = new System.Windows.Media.FontFamily("Arial"); foreach (var mockDrive in driveFontConfiguration.ExplorerTreeVM.Drives) { Assert.AreEqual(true, (mockDrive.FontVM as FakeFontViewModel).UpdateWasCalled); } }
public void UpdateDrives_UpdateForeachDrive_FontVmUpdateWasCalled() { FakeExplorerTreeViewModel stubExplorerTreeVM = CreateFakeExplorerTreeVM(); DriveFontConfiguration driveFontConfiguration = new DriveFontConfiguration(stubExplorerTreeVM); driveFontConfiguration.UpdateDrives(); foreach (var mockDrive in stubExplorerTreeVM.Drives) { Assert.AreEqual(true, (mockDrive.FontVM as FakeFontViewModel).UpdateWasCalled, "The fakePath of the item whose " + nameof(mockDrive.FontVM.Update) + "-Method was not called is: " + mockDrive.Name); } }
public void UpdateDrives_DrivePropertyNameIsDummyChild_FontVmUpdateWasNotCalled() { 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); DriveFontConfiguration driveFontConfiguration = new DriveFontConfiguration(stubExplorerTreeVM); driveFontConfiguration.UpdateDrives(); foreach (var mockDrive in stubExplorerTreeVM.Drives) { Assert.AreEqual(false, (mockDrive.FontVM as FakeFontViewModel).UpdateWasCalled); } }