1
|
/**
|
2
|
* '$RCSfile$'
|
3
|
* Copyright: 2004 Regents of the University of California and the
|
4
|
* National Center for Ecological Analysis and Synthesis
|
5
|
* Purpose: To test the Access Controls in metacat by JUnit
|
6
|
*
|
7
|
* '$Author: leinfelder $'
|
8
|
* '$Date: 2012-01-26 14:20:37 -0800 (Thu, 26 Jan 2012) $'
|
9
|
* '$Revision: 6958 $'
|
10
|
*
|
11
|
* This program is free software; you can redistribute it and/or modify
|
12
|
* it under the terms of the GNU General Public License as published by
|
13
|
* the Free Software Foundation; either version 2 of the License, or
|
14
|
* (at your option) any later version.
|
15
|
*
|
16
|
* This program is distributed in the hope that it will be useful,
|
17
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
18
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
19
|
* GNU General Public License for more details.
|
20
|
*
|
21
|
* You should have received a copy of the GNU General Public License
|
22
|
* along with this program; if not, write to the Free Software
|
23
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
24
|
*/
|
25
|
|
26
|
package edu.ucsb.nceas.metacat.admin.upgrade;
|
27
|
|
28
|
import junit.framework.Test;
|
29
|
import junit.framework.TestSuite;
|
30
|
import edu.ucsb.nceas.MCTestCase;
|
31
|
|
32
|
/**
|
33
|
* A JUnit test for testing Node Data Datetime upgrade
|
34
|
* KNB estimate:
|
35
|
* Total time: 20 minutes 58 seconds
|
36
|
*/
|
37
|
public class UpgradeNodeDataDatetimeTest
|
38
|
extends MCTestCase {
|
39
|
|
40
|
/**
|
41
|
* Constructor to build the test
|
42
|
*
|
43
|
* @param name the name of the test method
|
44
|
*/
|
45
|
public UpgradeNodeDataDatetimeTest(String name) {
|
46
|
super(name);
|
47
|
}
|
48
|
|
49
|
/**
|
50
|
* Establish a testing framework by initializing appropriate objects
|
51
|
*/
|
52
|
public void setUp() {
|
53
|
|
54
|
}
|
55
|
|
56
|
/**
|
57
|
* Release any objects after tests are complete
|
58
|
*/
|
59
|
public void tearDown() {
|
60
|
}
|
61
|
|
62
|
/**
|
63
|
* Create a suite of tests to be run together
|
64
|
*/
|
65
|
public static Test suite() {
|
66
|
TestSuite suite = new TestSuite();
|
67
|
suite.addTest(new UpgradeNodeDataDatetimeTest("initialize"));
|
68
|
// Test basic functions
|
69
|
suite.addTest(new UpgradeNodeDataDatetimeTest("upgrade"));
|
70
|
|
71
|
return suite;
|
72
|
}
|
73
|
|
74
|
/**
|
75
|
* Run an initial test that always passes to check that the test
|
76
|
* harness is working.
|
77
|
*/
|
78
|
public void initialize() {
|
79
|
assertTrue(1 == 1);
|
80
|
}
|
81
|
|
82
|
public void upgrade() throws Exception {
|
83
|
UpgradeNodeDataDatetime upgrader = new UpgradeNodeDataDatetime();
|
84
|
upgrader.upgrade();
|
85
|
}
|
86
|
|
87
|
}
|
88
|
|