Sort test members.

This commit is contained in:
Gary Gregory 2021-09-28 10:09:49 -04:00
parent 3664d88dfa
commit 78c4b0f865

View File

@ -26,18 +26,6 @@ import org.junit.Test;
public class SortedPropertiesTest {
@Test
public void testKeys() {
final SortedProperties sortedProperties = new SortedProperties();
for (char ch = 'Z'; ch >= 'A'; ch--) {
sortedProperties.put(String.valueOf(ch), "Value" + ch);
}
final Enumeration<Object> keys = sortedProperties.keys();
for (char ch = 'A'; ch <= 'Z'; ch++) {
Assert.assertEquals(String.valueOf(ch), keys.nextElement());
}
}
@Test
public void testEntrySet() {
final SortedProperties sortedProperties = new SortedProperties();
@ -51,4 +39,16 @@ public class SortedPropertiesTest {
Assert.assertEquals("Value" + ch, entry.getValue());
}
}
@Test
public void testKeys() {
final SortedProperties sortedProperties = new SortedProperties();
for (char ch = 'Z'; ch >= 'A'; ch--) {
sortedProperties.put(String.valueOf(ch), "Value" + ch);
}
final Enumeration<Object> keys = sortedProperties.keys();
for (char ch = 'A'; ch <= 'Z'; ch++) {
Assert.assertEquals(String.valueOf(ch), keys.nextElement());
}
}
}