public void Initialize() { _config = new StyleConfig(); _defaults = Substitute.For <IDefaultsProvider>(); _defaults.Run.Returns(new CssPropertiesSet()); _pStylePropsCache = Substitute.For <IStylePropsCache>(); _numPropsCache = Substitute.For <INumberingPropsCache>(); _rStylePropsCache = Substitute.For <IStylePropsCache>(); _rStylePropsCache.Get(Arg.Any <string>()).Returns(new CssPropertiesSet()); _propsFac = Substitute.For <ICssPropertiesFactory>(); _propsFac.Build(null).ReturnsForAnyArgs(x => new CssPropertiesSet()); _instance = new RunClassFactory( _config, new ClsNameGenerator(_config), _defaults, _pStylePropsCache, _numPropsCache, _rStylePropsCache, FacBuilder); }
public void Initialize() { _defaults = Substitute.For <IDefaultsProvider>(); _defaults.Run.Returns(new CssPropertiesSet()); _defaults.DefaultRunStyle.Returns(x => null); _defaults.DefaultParagraphStyle.Returns(x => null); _pStylePropsCache = Substitute.For <IStylePropsCache>(); _numPropsCache = Substitute.For <INumberingPropsCache>(); _rStylePropsCache = Substitute.For <IStylePropsCache>(); _rStylePropsCache.Get(Arg.Any <string>()).Returns(new CssPropertiesSet()); _propsFac = Substitute.For <ICssPropertiesFactory>(); _propsFac.Build(null).ReturnsForAnyArgs(x => new CssPropertiesSet()); _nameGen = new NameGenerator() { Prefix = "d" }; _instance = new RunClassFactory( _nameGen, _defaults, _pStylePropsCache, _numPropsCache, _rStylePropsCache, _propsFac); }