public void Item_GetUnknownItem_ReturnsNull() { CreateFontsAndColorItems(); AddDefaultTextAndBackgroundColorToRules(); global::EnvDTE.ColorableItems colorableItems = items.Item("Unknown item"); Assert.IsNull(colorableItems); }
public void Item_GetPlainTextItemInUpperCase_ReturnsColorableItems() { CreateFontsAndColorItems(); AddDefaultTextAndBackgroundColorToRules(); global::EnvDTE.ColorableItems colorableItems = items.Item("PLAIN TEXT"); string name = colorableItems.Name; Assert.AreEqual("Plain Text", name); }
public void Item_GetPlainTextItemWhenCustomHighlightingColorDoesNotExist_ReturnsPlainTextItemWithDefaultBackgroundColor() { CreateFontsAndColorItems(); global::EnvDTE.ColorableItems colorableItems = items.Item("Plain Text"); uint backgroundOleColor = colorableItems.Background; Color backgroundColor = ColorHelper.ConvertToColor(backgroundOleColor); Assert.AreEqual(ColorableItems.DefaultBackgroundColor, backgroundColor); }
public void Item_DefaultTextBackgroundColorIsBlue_PlainTextItemBackgroundIsBlue() { CreateFontsAndColorItems(); CustomizedHighlightingColor defaultColor = AddDefaultTextAndBackgroundColorToRules(); defaultColor.Background = Colors.Blue; global::EnvDTE.ColorableItems colorableItems = items.Item("Plain Text"); uint backgroundOleColor = colorableItems.Background; Color backgroundColor = ColorHelper.ConvertToColor(backgroundOleColor); Assert.AreEqual(Colors.Blue, backgroundColor); }
public void Item_GetPlainTextItemWhenCustomHighlightingColorDoesNotExist_PlainTextItemAddedToCustomizationColorsWhenBoldIsSetToTrue() { CreateFontsAndColorItems(); global::EnvDTE.ColorableItems colorableItems = items.Item("Plain Text"); colorableItems.Bold = true; CustomizedHighlightingColor color = fakeHighlightingRules .ColorsSaved .Find(c => c.Name == CustomizingHighlighter.DefaultTextAndBackground); Assert.IsNotNull(color); }