public void CanFetchMasterMods() { var fetch = new FetchMasterMods(); var data = fetch.Execute(); Assert.IsNotNull(data); Assert.IsTrue(data.Count > 0); }
public MasterModFactory() { var masterMods = _fetchMasterMods.Execute(); Dictionary <CraftingBenchJson, int> modTiers = new Dictionary <CraftingBenchJson, int>(); var modsByGroup = masterMods.GroupBy(x => x.BenchGroup); foreach (var modsInGroup in modsByGroup) { var orderedGroup = modsInGroup.OrderByDescending(x => x.BenchTier).ToList(); for (int i = 0; i < orderedGroup.Count; i++) { modTiers.Add(orderedGroup[i], i + 1); } } MasterMod = masterMods.Select(x => CreateMasterMod(x, modTiers)) .ToList(); }