public void LatestAvailable() { CKAN.CkanModule module = registry.LatestAvailable("AGExt", temp_ksp.KSP.Version()); Assert.AreEqual("AGExt", module.identifier); Assert.AreEqual("1.24a", module.version.ToString()); }
public void UpdateRegistry() { CKAN.Registry registry = CKAN.Registry.Empty(); CKAN.Repo.UpdateRegistry(TestData.TestKAN(), registry); // Test we've got an expected module. CKAN.CkanModule far = registry.LatestAvailable("FerramAerospaceResearch", new CKAN.KSPVersion("0.25.0")); Assert.AreEqual("v0.14.3.2", far.version.ToString()); }
// NOTE: I've *never* got these to fail. The problem I'm trying to reproduce // seems to involve saving to the registry and back. It's now fixed in // JsonSingleOrArrayConverter.cs, but these tests remain, because tests are good. public void Null_Filters() { // We had a bug whereby we could end up with a filter list of a single null. // Make sure that doesn't happen ever again. // We want a module that doesn't specify filters. CKAN.CkanModule mod = TestData.kOS_014_module(); test_filter(mod.install[0].filter, "kOS/filter"); test_filter(mod.install[0].filter_regexp, "kOS/filter_regexp"); // And Firespitter seems to trigger it. CKAN.CkanModule firespitter = TestData.FireSpitterModule(); foreach (var stanza in firespitter.install) { test_filter(stanza.filter, "Firespitter/filter"); test_filter(stanza.filter_regexp, "Firespitter/filter_regexp"); } }
public void Setup() { // Refresh our mod every time since our tests will hack its version and things. gameMod = TestData.kOS_014_module(); }