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;
|
2019-10-16 23:05:51 +00:00
|
|
|
|
using Wabbajack.Lib.Downloaders;
|
2019-10-16 03:10:34 +00:00
|
|
|
|
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);
|
|
|
|
|
}
|
2019-10-16 23:05:51 +00:00
|
|
|
|
|
|
|
|
|
[TestMethod]
|
|
|
|
|
public void VerifyLogoURLs()
|
|
|
|
|
{
|
|
|
|
|
var modlists = ModlistMetadata.LoadFromGithub();
|
|
|
|
|
|
2019-10-19 10:55:05 +00:00
|
|
|
|
foreach (var modlist in modlists.Select(m => m.Links))
|
2019-10-16 23:05:51 +00:00
|
|
|
|
{
|
2019-10-19 10:55:05 +00:00
|
|
|
|
var logo_state = DownloadDispatcher.ResolveArchive(modlist.ImageUri);
|
2019-10-16 23:05:51 +00:00
|
|
|
|
Assert.IsNotNull(logo_state);
|
2019-10-19 10:55:05 +00:00
|
|
|
|
Assert.IsTrue(logo_state.Verify(), $"{modlist.ImageUri} is not valid");
|
2019-10-16 23:05:51 +00:00
|
|
|
|
|
2019-10-19 10:55:05 +00:00
|
|
|
|
//modlist.LoadLogo();
|
|
|
|
|
//Assert.IsNotNull(modlist.Logo);
|
2019-10-16 23:05:51 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2019-10-15 23:23:14 +00:00
|
|
|
|
}
|
|
|
|
|
}
|