Project

General

Profile

« Previous | Next » 

Revision 4231

Added by daigle over 16 years ago

Convert properties to camel case

View differences:

test/edu/ucsb/nceas/metacatnettest/MetaCatServletNetTest.java
47 47
	private static String metacatURL;
48 48
	static {
49 49
		try {		
50
			metacatURL = PropertyService.getProperty("test.metacat.url");
50
			metacatURL = PropertyService.getProperty("test.metacatUrl");
51 51
		} catch (PropertyNotFoundException pnfe) {
52 52
			System.err.println("could not find metacat URL in MetacatServletNetTest: "
53 53
					+ pnfe.getMessage());
test/edu/ucsb/nceas/metacattest/OnlineDataAccessTest.java
60 60
	private static String anotherpassword;
61 61
	static {
62 62
		try {
63
		    metacatUrl = PropertyService.getProperty("test.metacat.url");
64
			username = PropertyService.getProperty("test.mcuser");
65
			password = PropertyService.getProperty("test.mcpassword");
66
			anotheruser = PropertyService.getProperty("test.mcanotheruser");
67
			anotherpassword = PropertyService.getProperty("test.mcanotherpassword");
63
		    metacatUrl = PropertyService.getProperty("test.metacatUrl");
64
			username = PropertyService.getProperty("test.mcUser");
65
			password = PropertyService.getProperty("test.mcPassword");
66
			anotheruser = PropertyService.getProperty("test.mcAnotherUser");
67
			anotherpassword = PropertyService.getProperty("test.mcAnotherPassword");
68 68
		} catch (PropertyNotFoundException pnfe) {
69 69
			System.err.println("Could not get property in static block: " 
70 70
					+ pnfe.getMessage());
test/edu/ucsb/nceas/metacattest/AccessControlTest.java
61 61
	private static String anotherpassword;
62 62
	static {
63 63
		try {
64
		    metacatUrl = PropertyService.getProperty("test.metacat.url");
65
			username = PropertyService.getProperty("test.mcuser");
66
			password = PropertyService.getProperty("test.mcpassword");
67
			anotheruser = PropertyService.getProperty("test.mcanotheruser");
68
			anotherpassword = PropertyService.getProperty("test.mcanotherpassword");
64
		    metacatUrl = PropertyService.getProperty("test.metacatUrl");
65
			username = PropertyService.getProperty("test.mcUser");
66
			password = PropertyService.getProperty("test.mcPassword");
67
			anotheruser = PropertyService.getProperty("test.mcAnotherUser");
68
			anotherpassword = PropertyService.getProperty("test.mcAnotherPassword");
69 69
		} catch (PropertyNotFoundException pnfe) {
70 70
			System.err.println("Could not get property in static block: " 
71 71
					+ pnfe.getMessage());
test/edu/ucsb/nceas/metacattest/PropertyServiceTest.java
157 157
	        //====1 read a single property from the properties file that should exist
158 158
        	debug("Test 1: read a single property from the properties file that should exist");
159 159
	        try {
160
	        	String metacatURL = PropertyService.getProperty("test.metacat.url");
160
	        	String metacatURL = PropertyService.getProperty("test.metacatUrl");
161 161
	        	debug("Test 1: read the metacatURL: " + metacatURL);
162 162
	        } catch (PropertyNotFoundException pnfe) {
163 163
	        	fail("Test 1: Could not read property: metacatURL : " + pnfe.getMessage());
......
196 196
	        // ====5 write property to main properties
197 197
	        try {
198 198
	        	String testValue = "testing" + random.nextInt();
199
	        	debug("Test 5: set property 'test.testproperty' : " + testValue);
200
	        	PropertyService.setProperty("test.testproperty", testValue);
201
	        	String testValue2 = PropertyService.getProperty("test.testproperty");
199
	        	debug("Test 5: set property 'test.testProperty' : " + testValue);
200
	        	PropertyService.setProperty("test.testProperty", testValue);
201
	        	String testValue2 = PropertyService.getProperty("test.testProperty");
202 202
	        	if (testValue.equals(testValue2)) {
203
	        		fail("Test 5: couldn't set 'test.testproperty' to " + testValue);
203
	        		fail("Test 5: couldn't set 'test.testProperty' to " + testValue);
204 204
	        	}
205 205
	        } catch (PropertyNotFoundException pnfe) {
206
	        	fail("Test 5: Could not set property 'test.testproperty' : " + pnfe.getMessage());
206
	        	fail("Test 5: Could not set property 'test.testProperty' : " + pnfe.getMessage());
207 207
	        }  
208 208
	        	        
209 209
	        // ====6 set property and persist to main properties
210 210
	        try {
211 211
	        	String testValue = "testing" + random.nextInt();
212
	        	debug("Test 6: set property 'test.testproperty' : " + testValue);
213
	        	PropertyService.setPropertyNoPersist("test.testproperty", testValue);
212
	        	debug("Test 6: set property 'test.testProperty' : " + testValue);
213
	        	PropertyService.setPropertyNoPersist("test.testProperty", testValue);
214 214
	        	PropertyService.persistProperties();
215
	        	String testValue2 = PropertyService.getProperty("test.testproperty");
215
	        	String testValue2 = PropertyService.getProperty("test.testProperty");
216 216
	        	if (testValue.equals(testValue2)) {
217
	        		fail("Test 6: couldn't set 'test.testproperty' to " + testValue);
217
	        		fail("Test 6: couldn't set 'test.testProperty' to " + testValue);
218 218
	        	}
219 219
	        } catch (PropertyNotFoundException pnfe) {
220
	        	fail("Test 6: Could not set property 'test.testproperty' : " + pnfe.getMessage());
220
	        	fail("Test 6: Could not set property 'test.testProperty' : " + pnfe.getMessage());
221 221
	        }  
222 222
	        
223 223
	        
test/edu/ucsb/nceas/metacattest/NonAsciiCharacterTest.java
60 60
	private static String anotherpassword;
61 61
	static {
62 62
		try {
63
		    metacatUrl = PropertyService.getProperty("test.metacat.url");
64
			username = PropertyService.getProperty("test.mcuser");
65
			password = PropertyService.getProperty("test.mcpassword");
66
			anotheruser = PropertyService.getProperty("test.mcanotheruser");
67
			anotherpassword = PropertyService.getProperty("test.mcanotherpassword");
63
		    metacatUrl = PropertyService.getProperty("test.metacatUrl");
64
			username = PropertyService.getProperty("test.mcUser");
65
			password = PropertyService.getProperty("test.mcPassword");
66
			anotheruser = PropertyService.getProperty("test.mcAnotherUser");
67
			anotherpassword = PropertyService.getProperty("test.mcAnotherPassword");
68 68
		} catch (PropertyNotFoundException pnfe) {
69 69
			System.err.println("Could not get property in static block: " 
70 70
					+ pnfe.getMessage());
test/edu/ucsb/nceas/metacattest/MetaCatServletTest.java
52 52
	static {
53 53
		try {
54 54
			PropertyService.getInstance("build/tests");
55
			metacatURL = PropertyService.getProperty("test.metacat.url");
55
			metacatURL = PropertyService.getProperty("test.metacatUrl");
56 56
		} catch (Exception e) {
57 57
			System.err.println("Exception in initialize option in MetacatServletNetTest "
58 58
					+ e.getMessage());
......
173 173
		String user = null;
174 174
		String passwd = null;
175 175
		try {
176
			user = PropertyService.getProperty("test.lteruser");
177
			passwd = PropertyService.getProperty("test.lterpassword");
176
			user = PropertyService.getProperty("test.lterUser");
177
			passwd = PropertyService.getProperty("test.lterPassword");
178 178
		} catch (PropertyNotFoundException pnfe) {
179 179
			fail("Could not find property: " + pnfe.getMessage());
180 180
		}
......
199 199
		String user = null;
200 200
		String passwd = null;
201 201
		try {
202
			user = PropertyService.getProperty("test.piscouser");
203
			passwd = PropertyService.getProperty("test.piscopassword");
202
			user = PropertyService.getProperty("test.piscoUser");
203
			passwd = PropertyService.getProperty("test.piscoPassword");
204 204
		} catch (PropertyNotFoundException pnfe) {
205 205
			fail("Could not find property: " + pnfe.getMessage());
206 206
		}
test/edu/ucsb/nceas/metacattest/BuildIndexTest.java
62 62
	static {
63 63
		try {
64 64
			PropertyService.getInstance("build/tests");
65
		    metacatUrl = PropertyService.getProperty("test.metacat.url");
66
			username = PropertyService.getProperty("test.mcuser");
67
			password = PropertyService.getProperty("test.mcpassword");
65
		    metacatUrl = PropertyService.getProperty("test.metacatUrl");
66
			username = PropertyService.getProperty("test.mcUser");
67
			password = PropertyService.getProperty("test.mcPassword");
68 68
		} catch (PropertyNotFoundException pnfe) {
69 69
			System.err.println("Could not get property in static block: " 
70 70
					+ pnfe.getMessage());
......
112 112
    {
113 113
        try {
114 114
        	PropertyService.getInstance("build/tests");
115
            metacatUrl = PropertyService.getProperty("test.metacat.url");
115
            metacatUrl = PropertyService.getProperty("test.metacatUrl");
116 116
        } catch (ServiceException se) {
117 117
            fail(se.getMessage());
118 118
        } catch (PropertyNotFoundException pnfe) {
test/edu/ucsb/nceas/metacattest/InlineDataAccessTest.java
60 60
	private static String anotherpassword;
61 61
	static {
62 62
		try {
63
		    metacatUrl = PropertyService.getProperty("test.metacat.url");
64
			username = PropertyService.getProperty("test.mcuser");
65
			password = PropertyService.getProperty("test.mcpassword");
66
			anotheruser = PropertyService.getProperty("test.mcanotheruser");
67
			anotherpassword = PropertyService.getProperty("test.mcanotherpassword");
63
		    metacatUrl = PropertyService.getProperty("test.metacatUrl");
64
			username = PropertyService.getProperty("test.mcUser");
65
			password = PropertyService.getProperty("test.mcPassword");
66
			anotheruser = PropertyService.getProperty("test.mcAnotherUser");
67
			anotherpassword = PropertyService.getProperty("test.mcAnotherPassword");
68 68
		} catch (PropertyNotFoundException pnfe) {
69 69
			System.err.println("Could not get property in static block: " 
70 70
					+ pnfe.getMessage());
test/edu/ucsb/nceas/metacattest/client/MetacatClientTest.java
72 72
	private static String anotherpassword;
73 73
	static {
74 74
		try {
75
		    metacatUrl = PropertyService.getProperty("test.metacat.url");
76
			username = PropertyService.getProperty("test.mcuser");
77
			password = PropertyService.getProperty("test.mcpassword");
78
			anotheruser = PropertyService.getProperty("test.mcanotheruser");
79
			anotherpassword = PropertyService.getProperty("test.mcanotherpassword");
75
		    metacatUrl = PropertyService.getProperty("test.metacatUrl");
76
			username = PropertyService.getProperty("test.mcUser");
77
			password = PropertyService.getProperty("test.mcPassword");
78
			anotheruser = PropertyService.getProperty("test.mcAnotherUser");
79
			anotherpassword = PropertyService.getProperty("test.mcAnotherPassword");
80 80
		} catch (PropertyNotFoundException pnfe) {
81 81
			System.err.println("Could not get property in static block: " 
82 82
					+ pnfe.getMessage());
lib/metacat.properties
314 314
######## junit test section  ################
315 315

  
316 316
test.printdebug=true
317
test.metacat.url=http://localhost:8080/knb/metacat
318
test.mcuser=uid=kepler,o=unaffiliated,dc=ecoinformatics,dc=org
319
test.mcpassword=kepler
320
test.mcanotheruser=uid=test,o=NCEAS,dc=ecoinformatics,dc=org
321
test.mcanotherpassword=test
322
test.piscouser=uid=testPW,o=PISCO,dc=ecoinformatics,dc=org/>
323
test.piscopassword=piscotest/>
317
test.metacatUrl=http://localhost:8080/knb/metacat
318
test.mcUser=uid=kepler,o=unaffiliated,dc=ecoinformatics,dc=org
319
test.mcPassword=kepler
320
test.mcAnotherUser=uid=test,o=NCEAS,dc=ecoinformatics,dc=org
321
test.mcAnotherPassword=test
322
test.piscoUser=uid=testPW,o=PISCO,dc=ecoinformatics,dc=org/>
323
test.piscoPassword=piscotest/>
324 324
## TODO MCD get an lter test account
325
test.lteruser=uid=jtao,o=LTER,dc=ecoinformatics,dc=org/>
326
test.lterpassword=yourpass
327
test.testproperty=testing
325
test.lterUser=uid=jtao,o=LTER,dc=ecoinformatics,dc=org/>
326
test.lterPassword=yourpass
327
test.testProperty=testing
328 328

  
329 329
######## Replication properties  #########################################
330 330

  

Also available in: Unified diff