wabbajack/Wabbajack.Test/ModlistMetadataTests.cs

39 lines
1.0 KiB
C#
Raw Normal View History

2019-10-15 23:23:14 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
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);
Assert.IsTrue(logo_state.Verify(), $"{modlist.ImageUri} is not valid");
//modlist.LoadLogo();
//Assert.IsNotNull(modlist.Logo);
}
}
2019-10-15 23:23:14 +00:00
}
}