mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
refactor: switch to xunit
This commit is contained in:
parent
9cf3fd42ed
commit
6770dce503
4 changed files with 50 additions and 21 deletions
|
|
@ -1,29 +1,22 @@
|
|||
using System.IO;
|
||||
using System.Reflection;
|
||||
using NUnit.Framework;
|
||||
using Xunit;
|
||||
|
||||
namespace Dalamud.Test {
|
||||
[TestFixture]
|
||||
public class LocalizationTests {
|
||||
private Localization localization;
|
||||
private readonly 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);
|
||||
|
||||
public LocalizationTests() {
|
||||
var workingDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
||||
this.localization = new Localization(workingDir);
|
||||
this.localization.OnLocalizationChanged += code => this.currentLangCode = code;
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Fact]
|
||||
public void SetupWithFallbacks_EventInvoked() {
|
||||
this.localization.SetupWithFallbacks();
|
||||
Assert.AreEqual("en", this.currentLangCode);
|
||||
Assert.Equal("en", this.currentLangCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue