2207 |
28 Apr 06 |
nicklas |
1 |
/* |
2207 |
28 Apr 06 |
nicklas |
$Id$ |
2207 |
28 Apr 06 |
nicklas |
3 |
|
4889 |
06 Apr 09 |
nicklas |
Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg |
2207 |
28 Apr 06 |
nicklas |
5 |
|
2304 |
22 May 06 |
jari |
This file is part of BASE - BioArray Software Environment. |
2304 |
22 May 06 |
jari |
Available at http://base.thep.lu.se/ |
2207 |
28 Apr 06 |
nicklas |
8 |
|
2207 |
28 Apr 06 |
nicklas |
BASE is free software; you can redistribute it and/or |
2207 |
28 Apr 06 |
nicklas |
modify it under the terms of the GNU General Public License |
4480 |
05 Sep 08 |
jari |
as published by the Free Software Foundation; either version 3 |
2207 |
28 Apr 06 |
nicklas |
of the License, or (at your option) any later version. |
2207 |
28 Apr 06 |
nicklas |
13 |
|
2207 |
28 Apr 06 |
nicklas |
BASE is distributed in the hope that it will be useful, |
2207 |
28 Apr 06 |
nicklas |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
2207 |
28 Apr 06 |
nicklas |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2207 |
28 Apr 06 |
nicklas |
GNU General Public License for more details. |
2207 |
28 Apr 06 |
nicklas |
18 |
|
2207 |
28 Apr 06 |
nicklas |
You should have received a copy of the GNU General Public License |
4514 |
11 Sep 08 |
jari |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
2207 |
28 Apr 06 |
nicklas |
21 |
*/ |
2207 |
28 Apr 06 |
nicklas |
22 |
import net.sf.basedb.core.HibernateUtil; |
2207 |
28 Apr 06 |
nicklas |
23 |
|
2209 |
03 May 06 |
nicklas |
24 |
public class TestDbInfo |
2207 |
28 Apr 06 |
nicklas |
25 |
{ |
2207 |
28 Apr 06 |
nicklas |
26 |
|
2207 |
28 Apr 06 |
nicklas |
27 |
static boolean ok = true; |
2207 |
28 Apr 06 |
nicklas |
28 |
public static void main(String[] args) |
2207 |
28 Apr 06 |
nicklas |
29 |
{ |
2207 |
28 Apr 06 |
nicklas |
30 |
TestUtil.checkArgs(args); |
2207 |
28 Apr 06 |
nicklas |
31 |
TestUtil.begin(); |
2207 |
28 Apr 06 |
nicklas |
32 |
ok = test_all(); |
2207 |
28 Apr 06 |
nicklas |
33 |
TestUtil.stop(); |
2207 |
28 Apr 06 |
nicklas |
34 |
} |
2207 |
28 Apr 06 |
nicklas |
35 |
|
2207 |
28 Apr 06 |
nicklas |
36 |
static boolean test_all() |
2207 |
28 Apr 06 |
nicklas |
37 |
{ |
2209 |
03 May 06 |
nicklas |
38 |
write("++Testing dbinfo"); |
2207 |
28 Apr 06 |
nicklas |
39 |
|
2209 |
03 May 06 |
nicklas |
40 |
try |
2209 |
03 May 06 |
nicklas |
41 |
{ |
2209 |
03 May 06 |
nicklas |
42 |
HibernateUtil.dbIndexes(!TestUtil.getSilent(), TestUtil.getSilent(), false, false); |
2209 |
03 May 06 |
nicklas |
43 |
} |
2209 |
03 May 06 |
nicklas |
44 |
catch (Throwable t) |
2209 |
03 May 06 |
nicklas |
45 |
{ |
2209 |
03 May 06 |
nicklas |
46 |
t.printStackTrace(); |
2209 |
03 May 06 |
nicklas |
47 |
ok = false; |
2209 |
03 May 06 |
nicklas |
48 |
} |
2207 |
28 Apr 06 |
nicklas |
49 |
|
2209 |
03 May 06 |
nicklas |
50 |
write("++Testing dbinfo "+(ok ? "OK" : "Failed")+"\n"); |
2207 |
28 Apr 06 |
nicklas |
51 |
return ok; |
2207 |
28 Apr 06 |
nicklas |
52 |
} |
2207 |
28 Apr 06 |
nicklas |
53 |
|
2207 |
28 Apr 06 |
nicklas |
54 |
|
2207 |
28 Apr 06 |
nicklas |
55 |
static void write(String message) |
2207 |
28 Apr 06 |
nicklas |
56 |
{ |
2207 |
28 Apr 06 |
nicklas |
57 |
System.out.println(message); |
2207 |
28 Apr 06 |
nicklas |
58 |
} |
2207 |
28 Apr 06 |
nicklas |
59 |
|
2207 |
28 Apr 06 |
nicklas |
60 |
|
2207 |
28 Apr 06 |
nicklas |
61 |
} |
2207 |
28 Apr 06 |
nicklas |
62 |
|