public void VersionRequirement_Compare_Null() { Assert.Throws <ArgumentNullException>(() => VersionRequirement.Compare(null, null, CompareType.EqualTo)); Version valid = Version.Parse("1.0"); Assert.Throws <ArgumentNullException>(() => VersionRequirement.Compare(valid, null, CompareType.EqualTo)); Assert.Throws <ArgumentNullException>(() => VersionRequirement.Compare(null, valid, CompareType.EqualTo)); }
public void VersionRequirement_Compare_Valid_Inputs(string a, string b, CompareType type, bool expected) { Assert.AreEqual(VersionRequirement.Compare(Version.Parse(a), Version.Parse(b), type), expected); }
public void VersionRequirement_Compare_Invalid_Compare(CompareType type) { var version = Version.Parse("1.0"); Assert.Throws <ArgumentException>(() => VersionRequirement.Compare(version, version, type)); }