Skip to content
Permalink
Browse files
test: Add test to check sort order of PGProperty values
  • Loading branch information
sehrope authored and vlsi committed Mar 8, 2020
1 parent 3ea0812 commit aa1b93f1286a308d632e3fcdf53a773cf428a18c
Showing 1 changed file with 12 additions and 0 deletions.
@@ -77,6 +77,18 @@ public void testGetSetAllProperties() {
}
}

@Test
public void testSortOrder() {
String prevName = null;
for (PGProperty property : PGProperty.values()) {
String name = property.name();
if (prevName != null) {
assertTrue("PGProperty names should be sorted in ascending order: " + name + " < " + prevName, name.compareTo(prevName) > 0);
}
prevName = name;
}
}

/**
* Test that the enum constant is common with the underlying property name.
*/

0 comments on commit aa1b93f

Please sign in to comment.