This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
The following commit(s) were added to refs/heads/master by this push:
new 78c4b0f Sort test members.
78c4b0f is described below
commit 78c4b0f865100d29b47cfc9a5f6acf07e8fd83ec
Author: Gary Gregory <[email protected]>
AuthorDate: Tue Sep 28 10:09:49 2021 -0400
Sort test members.
---
.../collections4/properties/SortedPropertiesTest.java | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git
a/src/test/java/org/apache/commons/collections4/properties/SortedPropertiesTest.java
b/src/test/java/org/apache/commons/collections4/properties/SortedPropertiesTest.java
index 26a095a..a1219b9 100644
---
a/src/test/java/org/apache/commons/collections4/properties/SortedPropertiesTest.java
+++
b/src/test/java/org/apache/commons/collections4/properties/SortedPropertiesTest.java
@@ -27,28 +27,28 @@ import org.junit.Test;
public class SortedPropertiesTest {
@Test
- public void testKeys() {
+ public void testEntrySet() {
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();
+ final Iterator<Map.Entry<Object, Object>> entries =
sortedProperties.entrySet().iterator();
for (char ch = 'A'; ch <= 'Z'; ch++) {
- Assert.assertEquals(String.valueOf(ch), keys.nextElement());
+ final Map.Entry<Object, Object> entry = entries.next();
+ Assert.assertEquals(String.valueOf(ch), entry.getKey());
+ Assert.assertEquals("Value" + ch, entry.getValue());
}
}
@Test
- public void testEntrySet() {
+ public void testKeys() {
final SortedProperties sortedProperties = new SortedProperties();
for (char ch = 'Z'; ch >= 'A'; ch--) {
sortedProperties.put(String.valueOf(ch), "Value" + ch);
}
- final Iterator<Map.Entry<Object, Object>> entries =
sortedProperties.entrySet().iterator();
+ final Enumeration<Object> keys = sortedProperties.keys();
for (char ch = 'A'; ch <= 'Z'; ch++) {
- final Map.Entry<Object, Object> entry = entries.next();
- Assert.assertEquals(String.valueOf(ch), entry.getKey());
- Assert.assertEquals("Value" + ch, entry.getValue());
+ Assert.assertEquals(String.valueOf(ch), keys.nextElement());
}
}
}