Project

General

Profile

« Previous | Next » 

Revision 4125

Added by daigle almost 16 years ago

Replace Options class with PropertyService

View differences:

MetaCatServletNetTest.java
28 28

  
29 29
import edu.ucsb.nceas.metacat.*;
30 30
import edu.ucsb.nceas.metacat.service.PropertyService;
31
import edu.ucsb.nceas.metacat.util.SystemUtil;
32
import edu.ucsb.nceas.utilities.Options;
33 31
import edu.ucsb.nceas.utilities.PropertyNotFoundException;
34 32
import edu.ucsb.nceas.morpho.framework.*;
35 33
import junit.framework.Test;
......
49 47
public class MetaCatServletNetTest extends TestCase {
50 48
	private static String metacatURL;
51 49
	static {
52
		try {
53
			metacatURL = SystemUtil.getServletURL();
54
			Options.initialize(new File("build/tests/metacat.properties"));
50
		try {		
51
			PropertyService.getInstance("build/tests");
52
			metacatURL = PropertyService.getProperty("test.metacat.url");
55 53
		} catch (PropertyNotFoundException pnfe) {
56 54
			System.err.println("could not find metacat URL in MetacatServletNetTest: "
57 55
					+ pnfe.getMessage());
......
125 123
		//insert invalid xml document
126 124
		number = Math.random() * 100000;
127 125
		serial = Integer.toString(((new Double(number)).intValue()));
128
		suite
129
				.addTest(new MetaCatServletNetTest("testInsertInvalidateXMLDocument",
126
		suite.addTest(new MetaCatServletNetTest("testInsertInvalidateXMLDocument",
130 127
						serial));
131 128
		//insert non well formed document
132 129
		number = Math.random() * 100000;

Also available in: Unified diff