18
18
*/
19
19
20
20
/*
21
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
22
- * Use is subject to license terms.
21
+ * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
23
22
*/
24
23
package org .opensolaris .opengrok .history ;
25
24
46
45
public class HistoryGuruTest {
47
46
48
47
private static TestRepository repository = new TestRepository ();
49
- private static List <File > files = new ArrayList <File >();
48
+ private static List <File > files = new ArrayList <>();
50
49
51
50
public HistoryGuruTest () {
52
51
}
@@ -59,6 +58,19 @@ public static void setUpClass() throws Exception {
59
58
FileUtilities .getAllFiles (new File (repository .getSourceRoot ()),
60
59
files , true );
61
60
RuntimeEnvironment .getInstance ().setVerbose (true );
61
+
62
+ HistoryGuru instance = HistoryGuru .getInstance ();
63
+ instance .addRepositories (repository .getSourceRoot ());
64
+
65
+ instance .createCache ();
66
+ Collection <String > repos = new ArrayList <>();
67
+ repos .add ("git" );
68
+ repos .add ("bazaar" );
69
+ repos .add ("mercurial" );
70
+ repos .add ("teamware" );
71
+ repos .add ("rcs_test" );
72
+ repos .add ("nonexistent" );
73
+ instance .createCache (repos );
62
74
}
63
75
64
76
@ AfterClass
@@ -79,26 +91,6 @@ public void testGetInstance() {
79
91
assertNotNull (HistoryGuru .getInstance ());
80
92
}
81
93
82
- @ Test
83
- public void testAddRepositories () throws IOException {
84
- HistoryGuru instance = HistoryGuru .getInstance ();
85
- instance .addRepositories (repository .getSourceRoot ());
86
- }
87
-
88
- @ Test
89
- public void testCreateCache () {
90
- HistoryGuru instance = HistoryGuru .getInstance ();
91
- instance .createCache ();
92
- Collection <String > repos = new ArrayList <String >();
93
- repos .add ("git" );
94
- repos .add ("bazaar" );
95
- repos .add ("mercurial" );
96
- repos .add ("teamware" );
97
- repos .add ("rcs_test" );
98
- repos .add ("nonexistent" );
99
- instance .createCache (repos );
100
- }
101
-
102
94
@ Test
103
95
public void testUpdateRepositories () {
104
96
HistoryGuru instance = HistoryGuru .getInstance ();
0 commit comments