private void AddNumberingProps(CssClass cssClass, RunClassParam param) { if (!param.NumberingId.HasValue || !param.NumberingLevel.HasValue) { return; } cssClass.Props.AddMany(_numPropsCache.Get(param.NumberingId.Value, param.NumberingLevel.Value)); }
private void AddNumberingStyleProps(ParagraphClassParam param, CssClass cssClass) { if (!param.NumberingId.HasValue || !param.NumberingLevel.HasValue) { return; } AddOrSet( cssClass, _numPropsCache.Get( param.NumberingId.Value, param.NumberingLevel.Value)); }
public void Build_NumberingPropsTest() { var propSet = new CssPropertiesSet { new MockProp1(), new MockProp2() }; _numPropsCache.Get(7, 2).Returns(propSet); var result = _instance.Build(new ParagraphClassParam { InlineProperties = new ParagraphProperties(), NumberingId = 7, NumberingLevel = 2 }); Assert.IsTrue(propSet.Equals(result.Props)); Utils.AssertDynamicClass(_nameGen.Prefix, result); }
public void Build_NumberingStyleTest() { var props = new CssPropertiesSet { new MockProp1(), new MockProp2() }; _numPropsCache.Get(7, 2).Returns(props); var result = _instance.Build(new RunClassParam { NumberingId = 7, NumberingLevel = 2 }); Assert.IsTrue(props.Equals(result.Props)); Utils.AssertDynamicClass(_config, result); }