mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
39 lines
1.0 KiB
C#
39 lines
1.0 KiB
C#
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using Wabbajack.Lib;
|
|
using Wabbajack.Lib.Downloaders;
|
|
using Wabbajack.Lib.ModListRegistry;
|
|
using Xunit;
|
|
using Xunit.Abstractions;
|
|
|
|
namespace Wabbajack.Test
|
|
{
|
|
public class ModlistMetadataTests : ATestBase
|
|
{
|
|
[Fact]
|
|
public async Task TestLoadingModlists()
|
|
{
|
|
var modlists = await ModlistMetadata.LoadFromGithub();
|
|
Assert.True(modlists.Count > 0);
|
|
}
|
|
|
|
[Fact]
|
|
public async Task VerifyLogoURLs()
|
|
{
|
|
var modlists = await ModlistMetadata.LoadFromGithub();
|
|
|
|
foreach (var modlist in modlists.Select(m => m.Links))
|
|
{
|
|
var logoState = DownloadDispatcher.ResolveArchive(modlist.ImageUri);
|
|
Assert.NotNull(logoState);
|
|
Assert.True(await logoState.Verify(new Archive(state: null){Size = 0}), $"{modlist.ImageUri} is not valid");
|
|
}
|
|
}
|
|
|
|
public ModlistMetadataTests(ITestOutputHelper output) : base(output)
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|