public BibleAnalyserTests() { var booksJson = File.ReadAllText(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Dictionary", "book-names.json")); var booksSettings = JsonConvert.DeserializeObject <BooksSettings>(booksJson); var books = Options.Create(booksSettings); var sectionsJson = File.ReadAllText(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Dictionary", "sections.json")); var sectionsSettings = JsonConvert.DeserializeObject <SectionsSettings>(sectionsJson); var sections = Options.Create(sectionsSettings); _bibleAnalyser = new BibleAnalyser(new Bible(books, sections)); }
public ParserHandlerTests() { var mixers = new IMixer[] { new EqualLengthMixer(), new SingleVerseNumberMixer(), new LastMixer(), }; var booksJson = File.ReadAllText(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Dictionary", "book-names.json")); var booksSettings = JsonConvert.DeserializeObject <BooksSettings>(booksJson); var books = Options.Create(booksSettings); var sectionsJson = File.ReadAllText(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Dictionary", "sections.json")); var sectionsSettings = JsonConvert.DeserializeObject <SectionsSettings>(sectionsJson); var sections = Options.Create(sectionsSettings); var bibleAnalyser = new BibleAnalyser(new Bible(books, sections)); _parserHandler = new ParserHandler(new MixerFactory(mixers), bibleAnalyser); }
public ParserHandler(MixerFactory mixerFactory, BibleAnalyser bibleAnalyser) { _mixerFactory = mixerFactory; _bibleAnalyser = bibleAnalyser; }
public TitleParser(Mixers.MixerFactory mixerFactory, BibleAnalyser bibleAnalyser) : base(mixerFactory) { _bibleAnalyser = bibleAnalyser; }