OLD | NEW |
1 var testCases = [ | 1 var testCases = [ |
2 { | 2 { |
3 name: 'RemoveSimple', | 3 name: 'RemoveSimple', |
4 precondition: [ | 4 precondition: [ |
5 {fullPath:'/a', isDirectory:true}, | 5 {fullPath:'/a', isDirectory:true}, |
6 {fullPath:'/b'} | 6 {fullPath:'/b'} |
7 ], | 7 ], |
8 tests: [ | 8 tests: [ |
9 function(helper) { helper.remove('/a'); }, | 9 function(helper) { helper.remove('/a'); }, |
10 function(helper) { helper.remove('/b'); }, | 10 function(helper) { helper.remove('/b'); }, |
11 function(helper) { helper.remove('/', FileError.INVALID_MODIFICATION
_ERR); } | 11 function(helper) { helper.remove('/', 'InvalidModificationError'); } |
12 ], | 12 ], |
13 postcondition: [ | 13 postcondition: [ |
14 {fullPath:'/a', nonexistent:true}, | 14 {fullPath:'/a', nonexistent:true}, |
15 {fullPath:'/b', nonexistent:true} | 15 {fullPath:'/b', nonexistent:true} |
16 ], | 16 ], |
17 }, | 17 }, |
18 { | 18 { |
19 name: 'RemoveNonRecursiveWithChildren', | 19 name: 'RemoveNonRecursiveWithChildren', |
20 precondition: [ | 20 precondition: [ |
21 {fullPath:'/a', isDirectory:true}, | 21 {fullPath:'/a', isDirectory:true}, |
22 {fullPath:'/a/b', isDirectory:true}, | 22 {fullPath:'/a/b', isDirectory:true}, |
23 {fullPath:'/a/c',} | 23 {fullPath:'/a/c',} |
24 ], | 24 ], |
25 tests: [ | 25 tests: [ |
26 function(helper) { helper.remove('/a', FileError.INVALID_MODIFICATIO
N_ERR); } | 26 function(helper) { helper.remove('/a', 'InvalidModificationError');
} |
27 ], | 27 ], |
28 postcondition: [ | 28 postcondition: [ |
29 {fullPath:'/a', isDirectory:true}, | 29 {fullPath:'/a', isDirectory:true}, |
30 {fullPath:'/a/b', isDirectory:true}, | 30 {fullPath:'/a/b', isDirectory:true}, |
31 {fullPath:'/a/c',} | 31 {fullPath:'/a/c',} |
32 ], | 32 ], |
33 }, | 33 }, |
34 { | 34 { |
35 name: 'RemoveRecursiveWithoutChildren', | 35 name: 'RemoveRecursiveWithoutChildren', |
36 precondition: [ | 36 precondition: [ |
37 {fullPath:'/a', isDirectory:true}, | 37 {fullPath:'/a', isDirectory:true}, |
38 ], | 38 ], |
39 tests: [ | 39 tests: [ |
40 function(helper) { helper.removeRecursively('/a'); } | 40 function(helper) { helper.removeRecursively('/a'); } |
41 ], | 41 ], |
42 postcondition: [ | 42 postcondition: [ |
43 {fullPath:'/a', nonexistent:true}, | 43 {fullPath:'/a', nonexistent:true}, |
44 ], | 44 ], |
45 }, | 45 }, |
46 { | 46 { |
47 name: 'RemoveRecursiveWithChildren', | 47 name: 'RemoveRecursiveWithChildren', |
48 precondition: [ | 48 precondition: [ |
49 {fullPath:'/a', isDirectory:true}, | 49 {fullPath:'/a', isDirectory:true}, |
50 {fullPath:'/a/b', isDirectory:true}, | 50 {fullPath:'/a/b', isDirectory:true}, |
51 {fullPath:'/a/c',} | 51 {fullPath:'/a/c',} |
52 ], | 52 ], |
53 tests: [ | 53 tests: [ |
54 function(helper) { helper.removeRecursively('/a'); }, | 54 function(helper) { helper.removeRecursively('/a'); }, |
55 function(helper) { helper.removeRecursively('/', FileError.INVALID_M
ODIFICATION_ERR); } | 55 function(helper) { helper.removeRecursively('/', 'InvalidModificatio
nError'); } |
56 ], | 56 ], |
57 postcondition: [ | 57 postcondition: [ |
58 {fullPath:'/a', nonexistent:true}, | 58 {fullPath:'/a', nonexistent:true}, |
59 ], | 59 ], |
60 }, | 60 }, |
61 ]; | 61 ]; |
62 | 62 |
OLD | NEW |