Example #1
0
        public void LocalStyleGroupRenderTest()
        {
            var style1     = new LinkedStyle("path/to/style1.css");
            var style2     = new LinkedStyle("path/to/style2.css");
            var styleGroup = new LocalStyleGroup();

            styleGroup.Add(style1);
            styleGroup.Add(style2);

            var rendered = styleGroup.Render();
            var expected = style1.Render() + Environment.NewLine + style2.Render();

            Assert.AreEqual(expected, rendered);
        }
Example #2
0
        public void LocalStyleGroupAddTest()
        {
            var styleGroup = new LocalStyleGroup();
            var path       = "path/to/style";
            var style1     = new LinkedStyle(path);
            var style2     = new LinkedStyle(path);

            styleGroup.Add(style1);
            try
            {
                styleGroup.Add(style2);
            }
            catch (ResourceAlreadyAddedException)
            {
                return;
            }
            catch (Exception)
            {
                Assert.Fail("Incorrect exception thrown.");
            }
            Assert.Fail("No exception thrown.");
        }