2019-11-21 14:27:35 +00:00
|
|
|
|
namespace Wabbajack.CacheServer.Test
|
2019-11-19 05:10:07 +00:00
|
|
|
|
{
|
2019-11-21 16:11:20 +00:00
|
|
|
|
//[TestClass]
|
2019-11-19 05:10:07 +00:00
|
|
|
|
public class CacheServerTests
|
|
|
|
|
{
|
2019-11-19 13:08:49 +00:00
|
|
|
|
// The server works, we just need to figure out proper testing.
|
|
|
|
|
/*
|
|
|
|
|
private Server _server;
|
|
|
|
|
private HttpClient _client;
|
|
|
|
|
public TestContext TestContext { get; set; }
|
2019-11-19 05:10:07 +00:00
|
|
|
|
|
2019-11-19 13:08:49 +00:00
|
|
|
|
[TestInitialize]
|
|
|
|
|
public void Setup()
|
|
|
|
|
{
|
|
|
|
|
Utils.LogMessages.Subscribe(msg => TestContext.WriteLine(msg));
|
|
|
|
|
_server = new Server("http://localhost:42420");
|
|
|
|
|
_server.Start();
|
|
|
|
|
_client = new NexusApiClient().HttpClient;
|
|
|
|
|
_client.BaseAddress = new Uri(_server.Address);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[TestCleanup]
|
|
|
|
|
public void Cleanup()
|
|
|
|
|
{
|
|
|
|
|
_server.Dispose();
|
|
|
|
|
}
|
2019-11-19 05:10:07 +00:00
|
|
|
|
|
2019-11-19 13:08:49 +00:00
|
|
|
|
[TestMethod]
|
|
|
|
|
public void TestAPIs()
|
|
|
|
|
{
|
2019-11-19 05:10:07 +00:00
|
|
|
|
|
2019-11-19 13:08:49 +00:00
|
|
|
|
_client.GetStringSync("/v1/games/skyrim/mods/70260.json");
|
|
|
|
|
_client.GetStringSync("/v1/games/fallout4/mods/38590/files/156741.json");
|
|
|
|
|
_client.GetStringSync(
|
|
|
|
|
"/nexus_cache_dir/68747470733a2f2f6170692e6e657875736d6f64732e636f6d2f76312f67616d65732f6f626c6976696f6e2f6d6f64732f383530302f66696c65732f363939332e6a736f6e.json");
|
|
|
|
|
|
|
|
|
|
}*/
|
2019-11-19 05:10:07 +00:00
|
|
|
|
}
|
|
|
|
|
}
|