예제 #1
0
        public void TestStrictGameComparator(String modVersion, String gameVersion, bool expectedResult)
        {
            var comparator = new CKAN.StrictGameComparator();

            // We're going to tweak compatibly of the mod
            gameMod.ksp_version = GameVersion.Parse(modVersion);

            // Now test!
            Assert.AreEqual(expectedResult, comparator.Compatible(new GameVersionCriteria(GameVersion.Parse(gameVersion)), gameMod));
        }
예제 #2
0
        public void TestStrictGameComparatorMinMax(String modMinVersion, String modMaxVersion, String gameVersion, bool expectedResult)
        {
            var comparator = new CKAN.StrictGameComparator();

            gameMod.ksp_version     = null;
            gameMod.ksp_version_min = modMinVersion == null ? null : GameVersion.Parse(modMinVersion);
            gameMod.ksp_version_max = modMaxVersion == null ? null : GameVersion.Parse(modMaxVersion);

            // Now test!
            Assert.AreEqual(expectedResult, comparator.Compatible(new GameVersionCriteria(GameVersion.Parse(gameVersion)), gameMod));
        }