wabbajack/Wabbajack.Common.Test/GameTests.cs
2021-06-12 14:31:35 -06:00

29 lines
790 B
C#

using System.Linq;
using Xunit;
namespace Wabbajack.Common.Test
{
public class GameTests
{
[Fact]
public void TestGetGameFromMO2ArchiveName()
{
var games = GameRegistry.Games.Select(x => (name: x.Value.MO2Name, game: x.Key));
foreach (var (name, game) in games)
{
if (name == null) continue;
var result = GameRegistry.TryGetByFuzzyName(name);
Assert.NotNull(result);
Assert.Equal(game, result.Game);
}
}
[Fact]
public void GamePathsDontIncludeDuplicateBackslash()
{
var path = Game.Morrowind.MetaData().GameLocation();
Assert.DoesNotContain("\\\\", path.ToString());
}
}
}