blob: 55d2ac7f7a6722556a741733cd9541358f7359ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
package com.netscape.cmscore.test;
import java.util.Enumeration;
/**
* Testing helper methods
*/
public class TestHelper {
public static boolean enumerationContains(Enumeration<?> enumeration,
Object element) {
while (enumeration.hasMoreElements()) {
if (enumeration.nextElement().equals(element)) {
return true;
}
}
return false;
}
public static boolean contains(String[] list, String element) {
for (int index = 0; index < list.length; index++) {
if (list[index].equals(element)) {
return true;
}
}
return false;
}
}
|