wabbajack/Wabbajack.Test/ModlistMetadataTests.cs

32 lines
887 B
C#
Raw Normal View History

2019-11-21 14:27:35 +00:00
using System.Linq;
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 void 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);
2019-11-06 13:21:39 +00:00
Assert.IsTrue(logo_state.Verify(), $"{modlist.ImageUri} is not valid");
}
2019-11-06 13:21:39 +00:00
}
2019-10-15 23:23:14 +00:00
}
}