Revision 4385
Added by daigle about 16 years ago
test/edu/ucsb/nceas/metacattest/harvesterClient/HarvestDetailLogTest.java | ||
---|---|---|
27 | 27 |
|
28 | 28 |
package edu.ucsb.nceas.metacattest.harvesterClient; |
29 | 29 |
|
30 |
import edu.ucsb.nceas.MCTestCase; |
|
30 | 31 |
import edu.ucsb.nceas.metacat.harvesterClient.Harvester; |
31 | 32 |
import edu.ucsb.nceas.metacat.harvesterClient.HarvestDetailLog; |
32 | 33 |
import edu.ucsb.nceas.metacat.harvesterClient.HarvestDocument; |
... | ... | |
36 | 37 |
|
37 | 38 |
import java.sql.Connection; |
38 | 39 |
import junit.framework.Test; |
39 |
import junit.framework.TestCase; |
|
40 | 40 |
import junit.framework.TestSuite; |
41 | 41 |
|
42 | 42 |
/** |
... | ... | |
44 | 44 |
* |
45 | 45 |
* @author costa |
46 | 46 |
*/ |
47 |
public class HarvestDetailLogTest extends TestCase { |
|
47 |
public class HarvestDetailLogTest extends MCTestCase {
|
|
48 | 48 |
|
49 | 49 |
private Harvester harvester; |
50 | 50 |
private HarvestDetailLog harvestDetailLog; |
... | ... | |
55 | 55 |
{ |
56 | 56 |
try |
57 | 57 |
{ |
58 |
PropertyService.getInstance("build/tests"); |
|
59 | 58 |
MetaCatUtil.pathsForIndexing |
60 | 59 |
= MetaCatUtil.getOptionList(PropertyService.getProperty("xml.indexPaths")); |
61 | 60 |
} |
test/edu/ucsb/nceas/metacattest/harvesterClient/HarvesterTest.java | ||
---|---|---|
27 | 27 |
|
28 | 28 |
package edu.ucsb.nceas.metacattest.harvesterClient; |
29 | 29 |
|
30 |
import edu.ucsb.nceas.MCTestCase; |
|
30 | 31 |
import edu.ucsb.nceas.metacat.harvesterClient.Harvester; |
31 | 32 |
import edu.ucsb.nceas.metacat.service.PropertyService; |
32 | 33 |
import edu.ucsb.nceas.metacat.util.MetaCatUtil; |
33 | 34 |
import edu.ucsb.nceas.utilities.PropertyNotFoundException; |
35 |
|
|
34 | 36 |
import junit.framework.Test; |
35 |
import junit.framework.TestCase; |
|
36 | 37 |
import junit.framework.TestSuite; |
37 | 38 |
|
38 | 39 |
/** |
... | ... | |
40 | 41 |
* |
41 | 42 |
* @author costa |
42 | 43 |
*/ |
43 |
public class HarvesterTest extends TestCase { |
|
44 |
public class HarvesterTest extends MCTestCase {
|
|
44 | 45 |
|
45 | 46 |
private Harvester harvester; |
46 | 47 |
/* Initialize Properties */ |
47 | 48 |
static { |
48 | 49 |
try { |
49 |
PropertyService.getInstance("build/tests"); |
|
50 | 50 |
MetaCatUtil.pathsForIndexing = MetaCatUtil.getOptionList( |
51 | 51 |
PropertyService.getProperty("xml.indexPaths")); |
52 | 52 |
} catch (Exception e) { |
test/edu/ucsb/nceas/metacattest/harvesterClient/HarvestDocumentTest.java | ||
---|---|---|
27 | 27 |
|
28 | 28 |
package edu.ucsb.nceas.metacattest.harvesterClient; |
29 | 29 |
|
30 |
import edu.ucsb.nceas.MCTestCase; |
|
30 | 31 |
import edu.ucsb.nceas.metacat.harvesterClient.HarvestDocument; |
31 | 32 |
import edu.ucsb.nceas.metacat.harvesterClient.HarvestSiteSchedule; |
32 | 33 |
import edu.ucsb.nceas.metacat.harvesterClient.Harvester; |
33 | 34 |
import edu.ucsb.nceas.metacat.service.PropertyService; |
34 | 35 |
import edu.ucsb.nceas.metacat.util.MetaCatUtil; |
35 | 36 |
|
36 |
import java.io.File; |
|
37 | 37 |
import java.io.StringReader; |
38 | 38 |
import java.util.Date; |
39 | 39 |
import junit.framework.Test; |
40 |
import junit.framework.TestCase; |
|
41 | 40 |
import junit.framework.TestSuite; |
42 | 41 |
|
43 | 42 |
/** |
... | ... | |
45 | 44 |
* |
46 | 45 |
* @author costa |
47 | 46 |
*/ |
48 |
public class HarvestDocumentTest extends TestCase { |
|
47 |
public class HarvestDocumentTest extends MCTestCase {
|
|
49 | 48 |
|
50 | 49 |
private Harvester harvester; |
51 | 50 |
private HarvestDocument harvestDocument; |
... | ... | |
55 | 54 |
{ |
56 | 55 |
try |
57 | 56 |
{ |
58 |
PropertyService.getInstance("build/tests"); |
|
59 | 57 |
MetaCatUtil.pathsForIndexing |
60 | 58 |
= MetaCatUtil.getOptionList(PropertyService.getProperty("xml.indexPaths")); |
61 | 59 |
} |
test/edu/ucsb/nceas/metacattest/harvesterClient/HarvestLogTest.java | ||
---|---|---|
28 | 28 |
package edu.ucsb.nceas.metacattest.harvesterClient; |
29 | 29 |
|
30 | 30 |
import edu.ucsb.nceas.metacat.harvesterClient.HarvestSiteSchedule; |
31 |
import java.io.File; |
|
32 | 31 |
import java.sql.Connection; |
33 |
import java.sql.DriverManager; |
|
34 |
import java.sql.SQLException; |
|
35 |
import java.sql.SQLWarning; |
|
36 | 32 |
import java.util.Date; |
33 |
|
|
34 |
import edu.ucsb.nceas.MCTestCase; |
|
37 | 35 |
import edu.ucsb.nceas.metacat.harvesterClient.Harvester; |
38 |
import edu.ucsb.nceas.metacat.harvesterClient.HarvestDetailLog; |
|
39 | 36 |
import edu.ucsb.nceas.metacat.harvesterClient.HarvestDocument; |
40 | 37 |
import edu.ucsb.nceas.metacat.harvesterClient.HarvestLog; |
41 | 38 |
import edu.ucsb.nceas.metacat.service.PropertyService; |
42 | 39 |
import edu.ucsb.nceas.metacat.util.MetaCatUtil; |
40 |
|
|
43 | 41 |
import junit.framework.Test; |
44 |
import junit.framework.TestCase; |
|
45 | 42 |
import junit.framework.TestSuite; |
46 | 43 |
|
47 | 44 |
/** |
... | ... | |
49 | 46 |
* |
50 | 47 |
* @author costa |
51 | 48 |
*/ |
52 |
public class HarvestLogTest extends TestCase { |
|
49 |
public class HarvestLogTest extends MCTestCase {
|
|
53 | 50 |
|
54 | 51 |
private Connection conn; |
55 | 52 |
private Harvester harvester; |
56 | 53 |
private HarvestLog harvestLogShallow; |
57 | 54 |
private HarvestLog harvestLogDeep; |
58 |
private HarvestDocument harvestDocument; |
|
59 | 55 |
private HarvestSiteSchedule harvestSiteSchedule; |
60 | 56 |
/* Initialize Properties*/ |
61 | 57 |
static |
62 | 58 |
{ |
63 | 59 |
try |
64 | 60 |
{ |
65 |
PropertyService.getInstance("build/tests"); |
|
66 | 61 |
MetaCatUtil.pathsForIndexing |
67 | 62 |
= MetaCatUtil.getOptionList(PropertyService.getProperty("xml.indexPaths")); |
68 | 63 |
} |
test/edu/ucsb/nceas/metacattest/harvesterClient/HarvestSiteScheduleTest.java | ||
---|---|---|
27 | 27 |
|
28 | 28 |
package edu.ucsb.nceas.metacattest.harvesterClient; |
29 | 29 |
|
30 |
import edu.ucsb.nceas.MCTestCase; |
|
30 | 31 |
import edu.ucsb.nceas.metacat.harvesterClient.Harvester; |
31 | 32 |
import edu.ucsb.nceas.metacat.harvesterClient.HarvestSiteSchedule; |
32 | 33 |
import edu.ucsb.nceas.metacat.service.PropertyService; |
33 | 34 |
import edu.ucsb.nceas.metacat.util.MetaCatUtil; |
34 | 35 |
|
35 |
import java.io.File; |
|
36 | 36 |
import java.util.Date; |
37 | 37 |
import javax.xml.parsers.ParserConfigurationException; |
38 | 38 |
import junit.framework.Test; |
39 |
import junit.framework.TestCase; |
|
40 | 39 |
import junit.framework.TestSuite; |
41 | 40 |
|
42 | 41 |
/** |
... | ... | |
44 | 43 |
* |
45 | 44 |
* @author costa |
46 | 45 |
*/ |
47 |
public class HarvestSiteScheduleTest extends TestCase { |
|
46 |
public class HarvestSiteScheduleTest extends MCTestCase {
|
|
48 | 47 |
|
49 | 48 |
private Harvester harvester; |
50 | 49 |
private HarvestSiteSchedule harvestSiteScheduleFuture; // future date next har |
... | ... | |
54 | 53 |
{ |
55 | 54 |
try |
56 | 55 |
{ |
57 |
PropertyService.getInstance("build/tests"); |
|
58 | 56 |
MetaCatUtil.pathsForIndexing |
59 | 57 |
= MetaCatUtil.getOptionList(PropertyService.getProperty("xml.indexPaths")); |
60 | 58 |
} |
Also available in: Unified diff
Convert remainder of tests that use PropertyService to extend the MCTestCase class