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 = KspVersion.Parse(modVersion); // Now test! Assert.AreEqual(expectedResult, comparator.Compatible(new KspVersionCriteria(KspVersion.Parse(gameVersion)), gameMod)); }
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 : KspVersion.Parse(modMinVersion); gameMod.ksp_version_max = modMaxVersion == null ? null : KspVersion.Parse(modMaxVersion); // Now test! Assert.AreEqual(expectedResult, comparator.Compatible(new KspVersionCriteria(KspVersion.Parse(gameVersion)), gameMod)); }