public static void Initalize(TestContext testContext) { AppData.SetApplicationData(Environment.CurrentDirectory); if (ItemDB.IsEmpty()) { ItemDB.Load("Data/ItemDB/GemList.xml", true); } _persistentData = new BarePersistentData { CurrentBuild = new PoEBuild() }; }
public static void ClassInitialize(TestContext testContext) { if (ItemDB.IsEmpty()) { ItemDB.Load("Data/ItemDB/GemList.xml", true); } _persistentData = new BarePersistentData { CurrentBuild = new PoEBuild() }; _persistentData.EquipmentData = EquipmentData.CreateAsync(_persistentData.Options).Result; _builds = TestBuildUrlLoader.LoadFromXmlFile("../../TestBuilds/BuildUrls.xml"); _builds.AddRange(TestBuildUrlLoader.LoadFromXmlFile("../../TestBuilds/EmptyBuildUrls.xml")); // This initialization requires a lot of time, so it is reasonable to reuse one instance if possible. // However, as some tests may change tree state this field should be used only for methods, // that does not depend on a tree instance. _tree = SkillTree.CreateAsync(_persistentData).Result; }