public void LoadedDataOverridersGetOverriderIsNull() { XmlDataOverriders xmlDataOverriders = XmlDataOverriders.Load(App.AssemblyPath, _gameData, _overrideFileNameSuffix); IOverrideLoader overrideLoader = xmlDataOverriders.GetOverrider(typeof(XmlDataOverridersTests)); Assert.IsNull(overrideLoader); }
public void LoadedDataOverridersGetOverrider(Type type) { XmlDataOverriders xmlDataOverriders = XmlDataOverriders.Load(GameData, OverrideFileNameSuffix); IOverrideLoader overrideLoader = xmlDataOverriders.GetOverrider(type); Assert.IsNotNull(overrideLoader); }
public OverrideBaseTests() { GameData gameData = new FileGameData(ModsTestFolder); XmlDataOverriders xmlDataOverriders = XmlDataOverriders.Load(gameData, OverrideFileNameSuffix); HeroOverrideLoader = (HeroOverrideLoader)xmlDataOverriders.GetOverrider(typeof(HeroDataParser)); HeroDataOverride = HeroOverrideLoader.GetOverride(CHeroId); LoadInitialValues(); }
private void LoadTestData() { _gameData = new FileGameData(_modsTestFolder); _gameData.LoadAllData(); _configuration = new Configuration(); _configuration.Load(); _gameStringParser = new GameStringParser(_configuration, _gameData); ParseGameStrings(); _defaultData = new DefaultData(_gameData); _defaultData.Load(); XmlDataOverriders xmlDataOverriders = XmlDataOverriders.Load(App.AssemblyPath, _gameData, _overrideFileNameSuffix); _heroOverrideLoader = (HeroOverrideLoader)xmlDataOverriders.GetOverrider(typeof(HeroDataParser)); _xmlDataService = new XmlDataService(_configuration, _gameData, _defaultData); }
private void LoadTestData() { GameData = new FileGameData(ModsTestFolder); GameData.LoadAllData(); Configuration = new Configuration(); Configuration.Load(); GameStringParser = new GameStringParser(Configuration, GameData); ParseGameStrings(); DefaultData = new DefaultData(GameData); DefaultData.Load(); XmlDataOverriders xmlDataOverriders = XmlDataOverriders.Load(GameData, OverrideFileNameSuffix); HeroOverrideLoader = (HeroOverrideLoader)xmlDataOverriders.GetOverrider(typeof(HeroDataParser)); XmlDataService = new XmlDataService(Configuration, GameData, DefaultData); }
private void LoadTestData() { XmlDataOverriders xmlDataOverriders = XmlDataOverriders.Load(App.AssemblyPath, GameData, _overrideFileNameSuffix); _matchAwardOverrideLoader = (MatchAwardOverrideLoader)xmlDataOverriders.GetOverrider(typeof(MatchAwardParser)); }
private void LoadTestData() { XmlDataOverriders xmlDataOverriders = XmlDataOverriders.Load(GameData, OverrideFileNameSuffix); UnitOverrideLoader = (UnitOverrideLoader)xmlDataOverriders.GetOverrider(typeof(UnitParser)); }
private void LoadTestData() { XmlDataOverriders xmlDataOverriders = XmlDataOverriders.Load(GameData, OverrideFileNameSuffix); MatchAwardOverrideLoader = (MatchAwardOverrideLoader)xmlDataOverriders.GetOverrider(typeof(MatchAwardParser)); }
private void SetUpDataProcessors() { IXmlDataService xmlDataService = new XmlDataService(Configuration, GameData, DefaultData); DataHero dataHero = new DataHero(new HeroDataParser(xmlDataService.GetInstance(), (HeroOverrideLoader)XmlDataOverriders.GetOverrider(typeof(HeroDataParser)))); DataUnit dataUnit = new DataUnit(new UnitParser(xmlDataService.GetInstance(), (UnitOverrideLoader)XmlDataOverriders.GetOverrider(typeof(UnitParser)))); DataMatchAward dataMatchAward = new DataMatchAward(new MatchAwardParser(xmlDataService.GetInstance(), (MatchAwardOverrideLoader)XmlDataOverriders.GetOverrider(typeof(MatchAwardParser)))); DataHeroSkin dataHeroSkin = new DataHeroSkin(new HeroSkinParser(xmlDataService.GetInstance())); DataMount dataMount = new DataMount(new MountParser(xmlDataService.GetInstance())); DataBanner dataBanner = new DataBanner(new BannerParser(xmlDataService.GetInstance())); DataSpray dataSpray = new DataSpray(new SprayParser(xmlDataService.GetInstance())); DataAnnouncer dataAnnouncer = new DataAnnouncer(new AnnouncerParser(xmlDataService.GetInstance())); DataVoiceLine dataVoiceLine = new DataVoiceLine(new VoiceLineParser(xmlDataService.GetInstance())); DataPortrait dataPortrait = new DataPortrait(new PortraitParser(xmlDataService.GetInstance())); DataEmoticon dataEmoticon = new DataEmoticon(new EmoticonParser(xmlDataService.GetInstance())); DataEmoticonPack dataEmoticonPack = new DataEmoticonPack(new EmoticonPackParser(xmlDataService.GetInstance())); DataBehaviorVeterancy dataBehaviorVeterancy = new DataBehaviorVeterancy(new BehaviorVeterancyParser(xmlDataService.GetInstance())); ImageHero filesHero = new ImageHero(CASCHotsStorage?.CASCHandler, StoragePath); ImageUnit filesUnit = new ImageUnit(CASCHotsStorage?.CASCHandler, StoragePath); ImageMatchAward filesMatchAward = new ImageMatchAward(CASCHotsStorage?.CASCHandler, StoragePath); ImageAnnouncer filesAnnouncer = new ImageAnnouncer(CASCHotsStorage?.CASCHandler, StoragePath); ImageVoiceLine filesVoiceLine = new ImageVoiceLine(CASCHotsStorage?.CASCHandler, StoragePath); ImageSpray filesSpray = new ImageSpray(CASCHotsStorage?.CASCHandler, StoragePath); ImageEmoticon filesEmoticon = new ImageEmoticon(CASCHotsStorage?.CASCHandler, StoragePath); DataProcessors.Add(new DataProcessor() { IsEnabled = ExtractDataOption.HasFlag(ExtractDataOption.HeroData), Name = dataHero.Name, Parse = (localization) => dataHero.Parse(localization), Validate = (localization) => dataHero.Validate(localization), Extract = (data) => filesHero.ExtractFiles(data), }); DataProcessors.Add(new DataProcessor() { IsEnabled = ExtractDataOption.HasFlag(ExtractDataOption.Unit), Name = dataUnit.Name, Parse = (localization) => dataUnit.Parse(localization), Validate = (localization) => dataUnit.Validate(localization), Extract = (data) => filesUnit.ExtractFiles(data), }); DataProcessors.Add(new DataProcessor() { IsEnabled = ExtractDataOption.HasFlag(ExtractDataOption.MatchAward), Name = dataMatchAward.Name, Parse = (localization) => dataMatchAward.Parse(localization), Validate = (localization) => dataMatchAward.Validate(localization), Extract = (data) => filesMatchAward.ExtractFiles(data), }); DataProcessors.Add(new DataProcessor() { IsEnabled = ExtractDataOption.HasFlag(ExtractDataOption.HeroSkin), Name = dataHeroSkin.Name, Parse = (localization) => dataHeroSkin.Parse(localization), Validate = (localization) => dataHeroSkin.Validate(localization), }); DataProcessors.Add(new DataProcessor() { IsEnabled = ExtractDataOption.HasFlag(ExtractDataOption.Mount), Name = dataMount.Name, Parse = (localization) => dataMount.Parse(localization), Validate = (localization) => dataMount.Validate(localization), }); DataProcessors.Add(new DataProcessor() { IsEnabled = ExtractDataOption.HasFlag(ExtractDataOption.Banner), Name = dataBanner.Name, Parse = (localization) => dataBanner.Parse(localization), Validate = (localization) => dataBanner.Validate(localization), }); DataProcessors.Add(new DataProcessor() { IsEnabled = ExtractDataOption.HasFlag(ExtractDataOption.Spray), Name = dataSpray.Name, Parse = (localization) => dataSpray.Parse(localization), Validate = (localization) => dataSpray.Validate(localization), Extract = (data) => filesSpray.ExtractFiles(data), }); DataProcessors.Add(new DataProcessor() { IsEnabled = ExtractDataOption.HasFlag(ExtractDataOption.Announcer), Name = dataAnnouncer.Name, Parse = (localization) => dataAnnouncer.Parse(localization), Validate = (localization) => dataAnnouncer.Validate(localization), Extract = (data) => filesAnnouncer.ExtractFiles(data), }); DataProcessors.Add(new DataProcessor() { IsEnabled = ExtractDataOption.HasFlag(ExtractDataOption.VoiceLine), Name = dataVoiceLine.Name, Parse = (localization) => dataVoiceLine.Parse(localization), Validate = (localization) => dataVoiceLine.Validate(localization), Extract = (data) => filesVoiceLine.ExtractFiles(data), }); DataProcessors.Add(new DataProcessor() { IsEnabled = ExtractDataOption.HasFlag(ExtractDataOption.Portrait), Name = dataPortrait.Name, Parse = (localization) => dataPortrait.Parse(localization), Validate = (localization) => dataPortrait.Validate(localization), }); DataProcessors.Add(new DataProcessor() { IsEnabled = ExtractDataOption.HasFlag(ExtractDataOption.Emoticon), Name = dataEmoticon.Name, Parse = (localization) => dataEmoticon.Parse(localization), Validate = (localization) => dataEmoticon.Validate(localization), Extract = (data) => filesEmoticon.ExtractFiles(data), }); DataProcessors.Add(new DataProcessor() { IsEnabled = ExtractDataOption.HasFlag(ExtractDataOption.EmoticonPack), Name = dataEmoticonPack.Name, Parse = (localization) => dataEmoticonPack.Parse(localization), Validate = (localization) => dataEmoticonPack.Validate(localization), }); DataProcessors.Add(new DataProcessor() { IsEnabled = ExtractDataOption.HasFlag(ExtractDataOption.Veterancy), Name = dataBehaviorVeterancy.Name, Parse = (localization) => dataBehaviorVeterancy.Parse(localization), Validate = (localization) => dataBehaviorVeterancy.Validate(localization), }); }