wabbajack/Wabbajack.Test/ModlistMetadataTests.cs

33 lines
929 B
C#
Raw Normal View History

2019-11-21 14:27:35 +00:00
using System.Linq;
using System.Threading.Tasks;
2019-10-15 23:23:14 +00:00
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Wabbajack.Lib.Downloaders;
using Wabbajack.Lib.ModListRegistry;
2019-10-15 23:23:14 +00:00
namespace Wabbajack.Test
{
[TestClass]
public class ModlistMetadataTests
{
[TestMethod]
public void TestLoadingModlists()
{
var modlists = ModlistMetadata.LoadFromGithub();
Assert.IsTrue(modlists.Count > 0);
}
[TestMethod]
public async Task VerifyLogoURLs()
{
var modlists = ModlistMetadata.LoadFromGithub();
foreach (var modlist in modlists.Select(m => m.Links))
{
var logo_state = DownloadDispatcher.ResolveArchive(modlist.ImageUri);
Assert.IsNotNull(logo_state);
Assert.IsTrue(await logo_state.Verify(), $"{modlist.ImageUri} is not valid");
}
2019-11-06 13:21:39 +00:00
}
2019-10-15 23:23:14 +00:00
}
}