public void DataDocumentROMLocaleTest() { using PortraitPackDataDocument document = PortraitPackDataDocument.Parse(GetBytesForROM("AdmiralKrakenovPortrait"), Localization.FRFR); Assert.AreEqual(Localization.FRFR, document.Localization); Assert.IsTrue(document.JsonDataDocument.RootElement.TryGetProperty("AdmiralKrakenovPortrait", out JsonElement _)); }
public void DataDocumentFileTest() { using PortraitPackDataDocument document = PortraitPackDataDocument.Parse(_dataFile); Assert.AreEqual(Localization.KOKR, document.Localization); Assert.IsTrue(document.JsonDataDocument.RootElement.TryGetProperty("AbathurToys18Portrait", out JsonElement _)); }
public void DataDocumentStreamTest() { using FileStream stream = new FileStream(_dataFile, FileMode.Open); using PortraitPackDataDocument document = PortraitPackDataDocument.Parse(stream, Localization.FRFR); Assert.AreEqual(Localization.FRFR, document.Localization); Assert.IsTrue(document.JsonDataDocument.RootElement.TryGetProperty("AdmiralKrakenovPortrait", out JsonElement _)); }
public void DataDocumentROMGSDTest() { using GameStringDocument gameStringDocument = GameStringDocument.Parse(_jsonGameStringFileKOKR); using PortraitPackDataDocument document = PortraitPackDataDocument.Parse(GetBytesForROM("AdmiralKrakenovPortrait"), gameStringDocument); Assert.AreEqual(Localization.KOKR, document.Localization); Assert.IsTrue(document.TryGetPortraitPackById("AdmiralKrakenovPortrait", out PortraitPack? portraitPack)); Assert.AreEqual("크라케노프 제독 초상화", portraitPack !.Name); }
public void DataDocumentFileGSDTest() { using GameStringDocument gameStringDocument = GameStringDocument.Parse(_jsonGameStringFileFRFR); using PortraitPackDataDocument document = PortraitPackDataDocument.Parse(_dataFile, gameStringDocument); Assert.AreEqual(Localization.FRFR, document.Localization); Assert.IsTrue(document.TryGetPortraitPackById("AbathurToys18Portrait", out PortraitPack? portraitPack)); Assert.AreEqual("애벌레투르 초상화", portraitPack !.Name); }
public void DataDocumentStreamWithGSDTest() { using GameStringDocument gameStringDocument = GameStringDocument.Parse(_jsonGameStringFileKOKR); using FileStream stream = new(_dataFile, FileMode.Open); using PortraitPackDataDocument document = PortraitPackDataDocument.Parse(stream, gameStringDocument); Assert.AreEqual(Localization.KOKR, document.Localization); Assert.IsTrue(document.JsonDataDocument.RootElement.TryGetProperty("AdmiralKrakenovPortrait", out JsonElement _)); }
public PortraitPackDataDocumentTests() { _portraitPackDataDocument = PortraitPackDataDocument.Parse(LoadJsonTestData(), Localization.ENUS); }