Example #1
0
        public void AsCss_ThemeColorAsciiTest()
        {
            var expectedCss = new CssData();

            expectedCss.AddAttribute("p", "color", "#FF00FF");
            _themeColorProvider.GetColor(ThemeColorValues.Accent1).Returns("FF00FF");
            _instance.Element.ThemeColor = new DocumentFormat.OpenXml.EnumValue <ThemeColorValues>(ThemeColorValues.Accent1);

            var result = _instance.AsCss();

            Assert.AreEqual(expectedCss, result);
        }
Example #2
0
        public void AsCss_ThemeColorTest()
        {
            var expected = new CssData();

            expected.AddAttribute("span.test", "text-decoration", "underline dashed #000000");
            _themeColorProvider.GetColor(Arg.Is(ThemeColorValues.Dark1)).Returns("000000");
            _instance.Element.Val        = new EnumValue <UnderlineValues>(UnderlineValues.DashedHeavy);
            _instance.Element.Color      = new StringValue("FFFFFF");
            _instance.Element.ThemeColor = new EnumValue <ThemeColorValues>(ThemeColorValues.Dark1);

            var data = _instance.AsCss();

            Assert.AreEqual(expected, data);
        }