public void GetName() { var provider = new StylesProvider(); var name = provider.GetName(1); Assert.AreEqual("Heading 2", name); }
public void GetCount() { var provider = new StylesProvider(); int count = provider.GetCount(); Assert.AreEqual(15, count); }
public void GetStyle() { var provider = new StylesProvider(); using (var style = provider.GetStyle(1)) { Assert.IsNotNull(style); Assert.AreEqual("Heading 2", style.Name); Assert.IsTrue(style.IsHeading); } }
public void GetStyles() { var provider = new StylesProvider(); var styles = provider.GetStyles(); Assert.IsNotNull(styles); Assert.AreEqual(15, styles.Count); foreach (var style in styles) { style.Dispose(); } }
public void Filter() { var provider = new StylesProvider(); var styles = provider.Filter( f => f.Attributes("isHeading").Any(a => a.Value.ToLower() .Equals("true", StringComparison.InvariantCultureIgnoreCase))); Assert.IsNotNull(styles); Assert.AreEqual(6, styles.Count()); foreach (var style in styles) { var a = style.Attribute("isHeading"); Assert.IsNotNull(a); Assert.AreEqual("true", a.Value); } }