Magic the magic happen

This commit is contained in:
Raymond Lynch 2021-07-11 16:32:29 -04:00
parent 84769ae5b7
commit 658eedca37
188 changed files with 10329 additions and 3549 deletions

View file

@ -1,20 +1,24 @@
using System.IO;
using System.IO;
using System.Reflection;
using Xunit;
namespace Dalamud.Test {
public class LocalizationTests {
namespace Dalamud.Test
{
public class LocalizationTests
{
private readonly Localization localization;
private string currentLangCode;
public LocalizationTests() {
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() {
public void SetupWithFallbacks_EventInvoked()
{
this.localization.SetupWithFallbacks();
Assert.Equal("en", this.currentLangCode);
}