public virtual void ResolveUnicodeRangeTest() { CssFontFaceRule fontFaceRule = new CssFontFaceRule(); IList <CssDeclaration> declarations = new List <CssDeclaration>(); declarations.Add(new CssDeclaration("unicode-range", "U+75")); fontFaceRule.AddBodyCssDeclarations(declarations); Range range = fontFaceRule.ResolveUnicodeRange(); NUnit.Framework.Assert.IsNotNull(range); NUnit.Framework.Assert.IsTrue(range.Contains(117)); }
public virtual void VerifyThatToStringProducesValidCss() { CssFontFaceRule fontFaceRule = new CssFontFaceRule(); IList <CssDeclaration> declarations = new List <CssDeclaration>(); declarations.Add(new CssDeclaration(CommonCssConstants.FONT_FAMILY, "test-font-family")); declarations.Add(new CssDeclaration(CommonCssConstants.FONT_WEIGHT, CommonCssConstants.BOLD)); fontFaceRule.AddBodyCssDeclarations(declarations); String expectedCss = "@font-face {\n" + " font-family: test-font-family;\n" + " font-weight: bold;\n" + "}"; NUnit.Framework.Assert.AreEqual(expectedCss, fontFaceRule.ToString()); }