示例#1
0
        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());
        }
示例#2
0
        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);
        }
示例#3
0
        // 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");
        }