mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 13:14:17 +01:00
29 lines
840 B
C#
29 lines
840 B
C#
using System.IO;
|
|
using System.Reflection;
|
|
using NUnit.Framework;
|
|
|
|
namespace Dalamud.Test {
|
|
[TestFixture]
|
|
public class LocalizationTests {
|
|
private Localization localization;
|
|
private string currentLangCode;
|
|
private string workingDir;
|
|
|
|
[OneTimeSetUp]
|
|
public void Init() {
|
|
this.workingDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
|
}
|
|
|
|
[SetUp]
|
|
public void Setup() {
|
|
this.localization = new Localization(this.workingDir);
|
|
this.localization.OnLocalizationChanged += code => this.currentLangCode = code;
|
|
}
|
|
|
|
[Test]
|
|
public void SetupWithFallbacks_EventInvoked() {
|
|
this.localization.SetupWithFallbacks();
|
|
Assert.AreEqual("en", this.currentLangCode);
|
|
}
|
|
}
|
|
}
|