private void CreateSUT(string itemText) { var compendium = new AffixCompendium(); var lexicon = new ItemTypeLexicon(); var parsers = new ModParsers(lexicon, compendium); SUT = new PoeItemParser(lexicon, parsers, itemText); }
protected void StartQuartermaster() { var compendium = new AffixCompendium(); var lexicon = new ItemTypeLexicon(); var parsers = new ModParsers(lexicon, compendium); _itemFactory = new PoeItemFactory(lexicon, parsers); _clipboardItemTextSource = new ClipboardItemTextSource(ClipboardMonitor, _itemTextChecker); Quartermaster = new QuartermasterStore(_itemFactory, _clipboardItemTextSource); QuartermasterViewModel = new QuartermasterViewModel(Substitute.For <IWindowManager>(), Quartermaster, ClipboardMonitor); QuartermasterViewModel.MonitorEvents(); }
private static void DoParseTest(string gameText, PoeItem expectedItem) { Console.WriteLine(gameText); var compendium = new AffixCompendium(); var lexicon = new ItemTypeLexicon(); var parsers = new ModParsers(lexicon, compendium); var itemFactory = new PoeItemFactory(lexicon, parsers); var actualItem = itemFactory.CreateItem(gameText); // Note that the mods on the expected object must be in the same order as the mods on the parsed item. // Which is actually determined by the order the parsers are run. This is crap but not sure how to fix it right now. actualItem.ShouldMatch(expectedItem.ToExpectedObject()); }