Added
Link Here
|
1 |
/* |
2 |
* Sun Public License Notice |
3 |
* |
4 |
* The contents of this file are subject to the Sun Public License |
5 |
* Version 1.0 (the "License"). You may not use this file except in |
6 |
* compliance with the License. A copy of the License is available at |
7 |
* http://www.sun.com/ |
8 |
* |
9 |
* The Original Code is NetBeans. The Initial Developer of the Original |
10 |
* Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun |
11 |
* Microsystems, Inc. All Rights Reserved. |
12 |
*/ |
13 |
|
14 |
package org.netbeans.modules.masterfs; |
15 |
|
16 |
import junit.framework.*; |
17 |
|
18 |
import java.io.*; |
19 |
import java.util.*; |
20 |
|
21 |
|
22 |
import org.openide.filesystems.*; |
23 |
//import org.openide.execution.*; |
24 |
import org.openide.*; |
25 |
import org.openide.util.lookup.ProxyLookup; |
26 |
import org.openide.util.lookup.InstanceContent; |
27 |
import org.openide.util.lookup.AbstractLookup; |
28 |
import org.openide.util.lookup.Lookups; |
29 |
import org.openide.util.Lookup; |
30 |
import org.netbeans.junit.*; |
31 |
import org.netbeans.modules.masterfs.providers.FileSystemProvider; |
32 |
import org.netbeans.modules.masterfs.providers.AutoMountProvider; |
33 |
import org.netbeans.modules.masterfs.providers.MountSupport; |
34 |
|
35 |
/** |
36 |
* |
37 |
* @author Jaroslav Tulach |
38 |
*/ |
39 |
public class GetChildrenScalesWithNumberOfFilesTest extends org.netbeans.junit.NbTestCase { |
40 |
private static MasterFileSystem masterfs; |
41 |
|
42 |
private FileObject fo; |
43 |
|
44 |
static { |
45 |
System.setProperty("org.openide.util.Lookup", org.netbeans.modules.masterfs.MasterFileSystemTest.TestLookup.class.getName()); |
46 |
} |
47 |
|
48 |
public static TestSuite suite () { |
49 |
return org.netbeans.junit.NbTestSuite.linearSpeedSuite (GetChildrenScalesWithNumberOfFilesTest.class, 3, 5); |
50 |
} |
51 |
|
52 |
/** Creates new MasterFileSystemTest */ |
53 |
public GetChildrenScalesWithNumberOfFilesTest(String name) { |
54 |
super(name); |
55 |
} |
56 |
|
57 |
protected void setUp () throws Exception { |
58 |
File f = getWorkDir (); |
59 |
|
60 |
|
61 |
int cnt = getTestNumber (); |
62 |
for (int i = 0; i < cnt; i++) { |
63 |
new File (f, i + ".tmp").createNewFile (); |
64 |
} |
65 |
|
66 |
fo = FileUtil.toFileObject (f); |
67 |
assertEquals (MasterFileSystem.class, fo.getFileSystem ().getClass ()); |
68 |
|
69 |
} |
70 |
|
71 |
protected void tearDown () throws Exception { |
72 |
fo.delete (); |
73 |
} |
74 |
|
75 |
|
76 |
public void test300 () { |
77 |
fo.getChildren (); |
78 |
} |
79 |
|
80 |
public void test900 () { |
81 |
fo.getChildren (); |
82 |
} |
83 |
|
84 |
public void test500 () { |
85 |
fo.getChildren (); |
86 |
} |
87 |
public void test2000 () { |
88 |
fo.getChildren (); |
89 |
} |
90 |
public void test5000 () { |
91 |
fo.getChildren (); |
92 |
} |
93 |
public void test8000 () { |
94 |
fo.getChildren (); |
95 |
} |
96 |
public void test10000 () { |
97 |
fo.getChildren (); |
98 |
} |
99 |
public void test15000 () { |
100 |
fo.getChildren (); |
101 |
} |
102 |
} |