public void GenerateLocalizationListTest() { try { List <Localization> localizationsList; LocalizationListGenerator localizationListGenerator = new LocalizationListGenerator(); localizationsList = localizationListGenerator.GenerateLocalizationList("Localizations"); Assert.AreEqual(1, localizationsList.Count); Localization localization = localizationsList[0]; Assert.AreEqual("text-text", localization.Tag); Assert.AreEqual("Test Language", localization.Name); } catch (Exception e) { Assert.Fail(e.Message); } }
public void LoadTest() { try { LocalizationListGenerator localizationListGenerator = new LocalizationListGenerator(); Localization localization = localizationListGenerator.GenerateLocalizationList("Localizations")[0]; localization.Load(); Assert.AreEqual(2, localization.EntriesCount); string entry1 = localization.GetLocalizationEntry("entry1"); string entry2 = localization.GetLocalizationEntry("entry2"); Assert.AreEqual("Entry 1 test text.", entry1); Assert.AreEqual("More test text, but for entry 2.", entry2); } catch (Exception e) { Assert.Fail(e.Message); } }