public void VersionRange_PrettyPrintAllRange() { // Arrange var formatter = new VersionRangeFormatter(); var range = VersionRange.All; // Act var s = string.Format(formatter, "{0:P}", range); var s2 = range.ToString("P", formatter); var s3 = range.PrettyPrint(); // Assert Assert.Equal("", s); Assert.Equal("", s2); Assert.Equal("", s3); }
public void VersionRange_PrettyPrintTests(string versionString, string expected) { // Arrange var formatter = new VersionRangeFormatter(); var range = VersionRange.Parse(versionString); // Act var s = string.Format(formatter, "{0:P}", range); var s2 = range.ToString("P", formatter); var s3 = range.PrettyPrint(); // Assert Assert.Equal(expected, s); Assert.Equal(expected, s2); Assert.Equal(expected, s3); }