public void KSHome() { var ks = new KerbalstuffMod { name = "foo bar", id = 123 }; // KSHome no longer escapes URLs. Assert.AreEqual("https://kerbalstuff.com/mod/123/foo bar", ks.GetPageUrl().ToString()); }
private static KerbalstuffMod MakeTestMod() { var ksmod = new KerbalstuffMod { license = "CC-BY", name = "Dogecoin Flag", short_description = "Such test. Very unit. Wow.", author = "pjf", versions = new KSVersion[1] }; ksmod.versions[0] = new KSVersion { friendly_version = new CKAN.Version("0.25"), download_path = new Uri("http://example.com/") }; return(ksmod); }
// GH #214: Make sure we pick up the right version public void KS_Version_Select_214() { var mod = KerbalstuffMod.FromJson(TestData.KS_CustomAsteroids_string()); Assert.AreEqual(711, mod.Latest().id, "GH #214 - Select default_version_id"); }