private bool VersionMatch(TestCassandraVersion versionAttr, Version executingVersion) { //Compare them as integers var expectedVersion = versionAttr.Major * 10000 + versionAttr.Minor; var actualVersion = executingVersion.Major * 10000 + executingVersion.Minor; var comparison = (Comparison)actualVersion.CompareTo(expectedVersion); if (comparison >= Comparison.Equal && versionAttr.Comparison >= Comparison.Equal) { return(true); } return(comparison == versionAttr.Comparison); }
private bool VersionMatch(TestCassandraVersion versionAttr, Version executingVersion) { //Compare them as integers var expectedVersion = versionAttr.Major * 10000 + versionAttr.Minor; var actualVersion = executingVersion.Major * 10000 + executingVersion.Minor; var comparison = (Comparison) actualVersion.CompareTo(expectedVersion); if (comparison >= Comparison.Equal && versionAttr.Comparison == Comparison.GreaterThanOrEqualsTo) { return true; } return comparison == versionAttr.Comparison; }