public void CompareToMethodVersionObject(int expected, string version1, string version2) { FakeResourceApiVersions v1 = ConvertFromString(version1); FakeResourceApiVersions v2 = null; if (version2 != null) { v2 = ConvertFromString(version2); } Assert.AreEqual(expected, v1.CompareTo(v2)); }
public void CompareToMethodString(int expected, string version1, string version2) { FakeResourceApiVersions v1 = version1 == "2019-12-01" ? FakeResourceApiVersions.V2019_12_01 : FakeResourceApiVersions.V2020_06_01; Assert.AreEqual(expected, v1.CompareTo(version2)); }