mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
22 lines
725 B
C#
22 lines
725 B
C#
using System.IO;
|
|
using System.Reflection;
|
|
using Xunit;
|
|
|
|
namespace Dalamud.Test {
|
|
public class LocalizationTests {
|
|
private readonly Localization localization;
|
|
private string currentLangCode;
|
|
|
|
public LocalizationTests() {
|
|
var workingDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
|
this.localization = new Localization(workingDir, "dalamud_");
|
|
this.localization.OnLocalizationChanged += code => this.currentLangCode = code;
|
|
}
|
|
|
|
[Fact]
|
|
public void SetupWithFallbacks_EventInvoked() {
|
|
this.localization.SetupWithFallbacks();
|
|
Assert.Equal("en", this.currentLangCode);
|
|
}
|
|
}
|
|
}
|