public void LocalStyleGroupRegisterTest()
        {
            var styleGroup = new LocalStyleGroup();
            var source     = "path/to/style";
            var style1     = new LinkedStyle(source);
            var style2     = new LinkedStyle(source);

            styleGroup.Register(style1);
            styleGroup.Register(style2);
            Assert.AreEqual(1, styleGroup.Count);
        }
        public void LocalStyleGroupRegisterTest3()
        {
            var styleGroup = new LocalStyleGroup {
                Helper = new MockLocalHelper()
            };
            var style1 = "~/Styles/Style1.css";
            var style2 = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "/Styles/Style1.css";

            styleGroup.Register(style1, style2);
            Assert.AreEqual(1, styleGroup.Count);
        }
        public void LocalStyleGroupRegisterTest2()
        {
            var styleGroup = new LocalStyleGroup();
            var source     = "path/to/style";
            var style1     = new LinkedStyle(source);
            var style2     = new LinkedStyle(source);

            Assert.IsFalse(styleGroup.HasRegistered(style1));
            Assert.IsFalse(styleGroup.HasRegistered(style2));
            styleGroup.Register(style1);
            Assert.IsTrue(styleGroup.HasRegistered(style1));
            Assert.IsTrue(styleGroup.HasRegistered(style2));
        }
        public void LocalStyleGroupRegisterTest4()
        {
            var styleGroup = new LocalStyleGroup {
                Helper = new MockLocalHelper()
            };
            var style = "~/Styles/DoesNotExist.css";

            try
            {
                styleGroup.Register(style);
            }
            catch (ResourceNotFoundException)
            {
                return;
            }
            catch (Exception)
            {
                Assert.Fail("Incorrect exception thrown.");
            }
            Assert.Fail("No exception thrown.");
        }