mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
29 lines
790 B
C#
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());
|
|
}
|
|
}
|
|
}
|