-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathUtilTest.java
More file actions
63 lines (49 loc) · 1.46 KB
/
UtilTest.java
File metadata and controls
63 lines (49 loc) · 1.46 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package ru.fusionsoft.dbgit;
import com.jcraft.jsch.jce.Random;
/*
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
*/
import ru.fusionsoft.dbgit.dbobjects.DBTableField;
import ru.fusionsoft.dbgit.utils.MaskFilter;
public class UtilTest /*extends TestCase*/ {
public void testMask() {
/*
MaskFilter mask = new MaskFilter("asd*.txt");
assertTrue(mask.match("asd12df.txt"));
assertFalse(mask.match("as612df.txt"));
mask = new MaskFilter("path/asd*.txt");
assertTrue(mask.match("path/asd12df.txt"));
assertFalse(mask.match("as612df.txt"));
mask = new MaskFilter("path/*");
assertTrue(mask.match("path/asd12df.txt"));
assertFalse(mask.match("pat/as612df.txt"));
mask = new MaskFilter("path/w*");
assertTrue(mask.match("path\\wsd12df.txt"));
assertFalse(mask.match("pat\\ws612df.txt"));
*/
}
public void testMapField() {
/*
IMapFields map = new TreeMapFields();
DBTableField f1 = new DBTableField();
f1.setName("f1");
DBTableField f2 = new DBTableField();
f2.setName("f2");
DBTableField f3 = new DBTableField();
f3.setName("f3");
DBTableField f4 = new DBTableField();
f4.setName("f4");
for (int i = 0; i < 10000; i++) {
DBTableField f = new DBTableField();
f.setName("item_"+Math.random()*10000000);
map.put(f);
}
map.put(f2);
map.put(f1);
map.put(f3);
map.put(f4);
*/
}
}