public void DataDocumentROMLocaleTest() { using BannerDataDocument document = BannerDataDocument.Parse(GetBytesForROM("BannerD3DemonHunter"), Localization.FRFR); Assert.AreEqual(Localization.FRFR, document.Localization); Assert.IsTrue(document.JsonDataDocument.RootElement.TryGetProperty("BannerD3DemonHunter", out JsonElement _)); }
public void DataDocumentFileTest() { using BannerDataDocument document = BannerDataDocument.Parse(_dataFile); Assert.AreEqual(Localization.KOKR, document.Localization); Assert.IsTrue(document.JsonDataDocument.RootElement.TryGetProperty("BannerD3DemonHunter", out JsonElement _)); }
public void DataDocumentStreamTest() { using FileStream stream = new FileStream(_dataFile, FileMode.Open); using BannerDataDocument document = BannerDataDocument.Parse(stream, Localization.FRFR); Assert.AreEqual(Localization.FRFR, document.Localization); Assert.IsTrue(document.JsonDataDocument.RootElement.TryGetProperty("BannerD3DemonHunter", out JsonElement _)); }
public void DataDocumentROMGSDTest() { using GameStringDocument gameStringDocument = GameStringDocument.Parse(_jsonGameStringFileKOKR); using BannerDataDocument document = BannerDataDocument.Parse(GetBytesForROM("BannerD3DemonHunter"), gameStringDocument); Assert.AreEqual(Localization.KOKR, document.Localization); Assert.IsTrue(document.TryGetBannerById("BannerD3DemonHunter", out Banner _)); }
public void DataDocumentFileGSDTest() { using GameStringDocument gameStringDocument = GameStringDocument.Parse(_jsonGameStringFileFRFR); using BannerDataDocument document = BannerDataDocument.Parse(_dataFile, gameStringDocument); Assert.AreEqual(Localization.FRFR, document.Localization); Assert.IsTrue(document.TryGetBannerById("BannerD3DemonHunter", out Banner _)); }
public void DataDocumentStreamWithGSDTest() { using GameStringDocument gameStringDocument = GameStringDocument.Parse(_jsonGameStringFileKOKR); using FileStream stream = new FileStream(_dataFile, FileMode.Open); using BannerDataDocument document = BannerDataDocument.Parse(stream, gameStringDocument); Assert.AreEqual(Localization.KOKR, document.Localization); Assert.IsTrue(document.JsonDataDocument.RootElement.TryGetProperty("BannerD3DemonHunter", out JsonElement _)); }
public async Task DataDocumentStreamWithGameStringStreamAsyncTest() { using FileStream streamGameString = new FileStream(_jsonGameStringFileKOKR, FileMode.Open); using FileStream stream = new FileStream(_dataFile, FileMode.Open); using BannerDataDocument document = await BannerDataDocument.ParseAsync(stream, streamGameString); Assert.AreEqual(Localization.KOKR, document.Localization); Assert.IsTrue(document.JsonDataDocument.RootElement.TryGetProperty("BannerD3DemonHunter", out JsonElement _)); }
public void UpdateGameStringBannerTest() { using BannerDataDocument dataDocument = _heroesDataDirectory.BannerData(new HeroesDataVersion(2, 47, 3, 76124), true, Localization.KOKR); Banner data = dataDocument.GetBannerById("BannerD3DemonHunter"); Assert.AreEqual("악마사냥꾼 깃발", data.Name); _heroesDataDirectory.UpdateGameString(data, new HeroesDataVersion(2, 48, 4, 77407), Localization.ENUS); Assert.AreEqual("bannerName", data.Name); }
public void BannerDataTest(int major, int minor, int revision, int build, bool isPtr, bool gamestrings, Localization localization) { BannerDataDocument dataDocument = _heroesDataDirectory.BannerData(new HeroesDataVersion(major, minor, revision, build, isPtr), gamestrings, localization); Assert.IsTrue(dataDocument.TryGetBannerById("BannerD3DemonHunter", out Banner? value)); if (gamestrings) { Assert.IsTrue(!string.IsNullOrEmpty(value !.Name)); } else { Assert.IsFalse(!string.IsNullOrEmpty(value !.Name)); } }
public BannerDataDocumentTests() { _bannerDataDocument = BannerDataDocument.Parse(LoadJsonTestData(), Localization.ENUS); }