diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-05-28 01:49:21 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-05-28 01:49:21 -0400 |
commit | 5af58c7b18a120ce47f230ede7f116678d97e038 (patch) | |
tree | 0639add41b5e6b9e234d8e2c17884fd0153c76b9 /src/StardewModdingAPI.Tests/TranslationTests.cs | |
parent | 12ffd9c334906e2256a1c32976b6a07f75027f25 (diff) | |
download | SMAPI-5af58c7b18a120ce47f230ede7f116678d97e038.tar.gz SMAPI-5af58c7b18a120ce47f230ede7f116678d97e038.tar.bz2 SMAPI-5af58c7b18a120ce47f230ede7f116678d97e038.zip |
refactor translation init for reuse (#296)
Diffstat (limited to 'src/StardewModdingAPI.Tests/TranslationTests.cs')
-rw-r--r-- | src/StardewModdingAPI.Tests/TranslationTests.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/StardewModdingAPI.Tests/TranslationTests.cs b/src/StardewModdingAPI.Tests/TranslationTests.cs index 3e6e6499..76da8706 100644 --- a/src/StardewModdingAPI.Tests/TranslationTests.cs +++ b/src/StardewModdingAPI.Tests/TranslationTests.cs @@ -40,7 +40,7 @@ namespace StardewModdingAPI.Tests var data = new Dictionary<string, IDictionary<string, string>>(); // act - ITranslationHelper helper = new TranslationHelper("ModName", "en", LocalizedContentManager.LanguageCode.en, data); + ITranslationHelper helper = new TranslationHelper("ModName", "en", LocalizedContentManager.LanguageCode.en).SetTranslations(data); Translation translation = helper.Translate("key"); // assert @@ -62,7 +62,7 @@ namespace StardewModdingAPI.Tests // act var actual = new Dictionary<string, IDictionary<string, string>>(); - TranslationHelper helper = new TranslationHelper("ModName", "en", LocalizedContentManager.LanguageCode.en, data); + TranslationHelper helper = new TranslationHelper("ModName", "en", LocalizedContentManager.LanguageCode.en).SetTranslations(data); foreach (string locale in expected.Keys) { this.AssertSetLocale(helper, locale, LocalizedContentManager.LanguageCode.en); @@ -86,7 +86,7 @@ namespace StardewModdingAPI.Tests // act var actual = new Dictionary<string, IDictionary<string, string>>(); - TranslationHelper helper = new TranslationHelper("ModName", "en", LocalizedContentManager.LanguageCode.en, data); + TranslationHelper helper = new TranslationHelper("ModName", "en", LocalizedContentManager.LanguageCode.en).SetTranslations(data); foreach (string locale in expected.Keys) { this.AssertSetLocale(helper, locale, LocalizedContentManager.LanguageCode.en); |