public void RangeIncludesTest(string rangeValue, string verValue, bool success) { Assert.True(PluginVersionRange.TryParse(rangeValue, out var range)); Assert.True(PluginVersion.TryParse(verValue, out var ver)); Assert.Equal(success, range.Includes(ver)); }
public void RangeToStringTest(int minMajor, int?minMinor, int?minPatch, bool minInclusive, int maxMajor, int?maxMinor, int?maxPatch, bool maxInclusive) { var min = MakeVersion(minMajor, minMinor, minPatch); var max = MakeVersion(maxMajor, maxMinor, maxPatch); var range = new PluginVersionRange(min, minInclusive, max, maxInclusive); Assert.True(PluginVersionRange.TryParse(range.ToString(), out var reverseRange)); Assert.Equal(range, reverseRange); }
public void RangeParseTest(string value, bool success) { Assert.Equal(success, PluginVersionRange.TryParse(value, out _)); }