Skip to content

Commit ead3a66

Browse files
committed
sort tests
1 parent 8bfcda5 commit ead3a66

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

src/test/java/org/htmlunit/general/DedicatedWorkerGlobalScopeConstantsTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,11 @@ public class DedicatedWorkerGlobalScopeConstantsTest extends WebDriverTestCase {
5050
*/
5151
public static Collection<Arguments> data() throws Exception {
5252
final List<Arguments> list = new ArrayList<>();
53-
final Set<String> strings = TestCaseTest.getAllConfiguredJsClassNames();
54-
for (final String host : strings) {
53+
final Set<String> classNames = TestCaseTest.getAllConfiguredJsClassNames();
54+
final ArrayList<String> classNamesSorted = new ArrayList<>(classNames);
55+
Collections.sort(classNamesSorted);
56+
57+
for (final String host : classNamesSorted) {
5558
if (!"Audio".equals(host)) {
5659
list.add(Arguments.of(host));
5760
}

src/test/java/org/htmlunit/general/HostConstantsTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,11 @@ public class HostConstantsTest extends WebDriverTestCase {
4848
*/
4949
public static Collection<Arguments> data() throws Exception {
5050
final List<Arguments> list = new ArrayList<>();
51-
final Set<String> strings = TestCaseTest.getAllConfiguredJsClassNames();
52-
for (final String host : strings) {
51+
final Set<String> classNames = TestCaseTest.getAllConfiguredJsClassNames();
52+
final ArrayList<String> classNamesSorted = new ArrayList<>(classNames);
53+
Collections.sort(classNamesSorted);
54+
55+
for (final String host : classNamesSorted) {
5356
if (!"Audio".equals(host)) {
5457
list.add(Arguments.of(host));
5558
}

src/test/java/org/htmlunit/general/HostConstructorTest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import java.util.ArrayList;
1818
import java.util.Collection;
19+
import java.util.Collections;
1920
import java.util.List;
2021
import java.util.Set;
2122

@@ -40,8 +41,11 @@ public class HostConstructorTest extends WebDriverTestCase {
4041
*/
4142
public static Collection<Arguments> data() throws Exception {
4243
final List<Arguments> list = new ArrayList<>();
43-
final Set<String> strings = TestCaseTest.getAllConfiguredJsClassNames();
44-
for (final String className : strings) {
44+
final Set<String> classNames = TestCaseTest.getAllConfiguredJsClassNames();
45+
final ArrayList<String> classNamesSorted = new ArrayList<>(classNames);
46+
Collections.sort(classNamesSorted);
47+
48+
for (final String className : classNamesSorted) {
4549
list.add(Arguments.of(className));
4650
}
4751
return list;

0 commit comments

Comments
 (0)