wabbajack/Wabbajack.Common.Test/GameTests.cs

29 lines
790 B
C#
Raw Normal View History

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);
}
}
2021-06-12 20:31:35 +00:00
[Fact]
public void GamePathsDontIncludeDuplicateBackslash()
{
var path = Game.Morrowind.MetaData().GameLocation();
Assert.DoesNotContain("\\\\", path.ToString());
}
}
}