Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 62b4ff237c771a8318124dde4be8c343ccb9c779 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
/*******************************************************************************
* Copyright (c) 2012 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
* 
* Contributors:
*     Oracle - initial API and implementation
*******************************************************************************/
package org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.persistence;

import org.eclipse.jpt.common.utility.model.listener.PropertyChangeListener;
import org.eclipse.jpt.jpa.core.JpaFacet;
import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnitProperties;
import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetDataModelProperties;
import org.eclipse.jpt.jpa.eclipselink.core.context.persistence.Logging2_0;
import org.eclipse.jpt.jpa.eclipselink.core.context.persistence.Logging2_4;
import org.eclipse.jpt.jpa.eclipselink.core.context.persistence.LoggingLevel;
import org.eclipse.jpt.jpa.eclipselink.core.platform.EclipseLinkPlatform;
import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;

public class EclipseLink2_4LoggingTests extends EclipseLink2_0PersistenceUnitTestCase {
	private Logging2_0 logging;

	public static final String SQL_LOGGING_KEY = Logging2_0.ECLIPSELINK_SQL_CATEGORY_LOGGING_LEVEL;
	public static final LoggingLevel SQL_LOGGING_TEST_VALUE = LoggingLevel.off;
	public static final LoggingLevel SQL_LOGGING_TEST_VALUE_2 = LoggingLevel.severe;

	public static final String TRANSACTION_LOGGING_KEY = Logging2_0.ECLIPSELINK_TRANSACTION_CATEGORY_LOGGING_LEVEL;
	public static final LoggingLevel TRANSACTION_LOGGING_TEST_VALUE = LoggingLevel.warning;
	public static final LoggingLevel TRANSACTION_LOGGING_TEST_VALUE_2 = LoggingLevel.info;

	public static final String EVENT_LOGGING_KEY = Logging2_0.ECLIPSELINK_EVENT_CATEGORY_LOGGING_LEVEL;
	public static final LoggingLevel EVENT_LOGGING_TEST_VALUE = LoggingLevel.config;
	public static final LoggingLevel EVENT_LOGGING_TEST_VALUE_2 = LoggingLevel.fine;

	public static final String CONNECTION_LOGGING_KEY = Logging2_0.ECLIPSELINK_CONNECTION_CATEGORY_LOGGING_LEVEL;
	public static final LoggingLevel CONNECTION_LOGGING_TEST_VALUE = LoggingLevel.finer;
	public static final LoggingLevel CONNECTION_LOGGING_TEST_VALUE_2 = LoggingLevel.finest;

	public static final String QUERY_LOGGING_KEY = Logging2_0.ECLIPSELINK_QUERY_CATEGORY_LOGGING_LEVEL;
	public static final LoggingLevel QUERY_LOGGING_TEST_VALUE = LoggingLevel.all;
	public static final LoggingLevel QUERY_LOGGING_TEST_VALUE_2 = LoggingLevel.off;

	public static final String CACHE_LOGGING_KEY = Logging2_0.ECLIPSELINK_CACHE_CATEGORY_LOGGING_LEVEL;
	public static final LoggingLevel CACHE_LOGGING_TEST_VALUE = LoggingLevel.severe;
	public static final LoggingLevel CACHE_LOGGING_TEST_VALUE_2 = LoggingLevel.warning;

	public static final String PROPAGATION_LOGGING_KEY = Logging2_0.ECLIPSELINK_PROPAGATION_CATEGORY_LOGGING_LEVEL;
	public static final LoggingLevel PROPAGATION_LOGGING_TEST_VALUE = LoggingLevel.info;
	public static final LoggingLevel PROPAGATION_LOGGING_TEST_VALUE_2 = LoggingLevel.config;

	public static final String SEQUENCING_LOGGING_KEY = Logging2_0.ECLIPSELINK_SEQUENCING_CATEGORY_LOGGING_LEVEL;
	public static final LoggingLevel SEQUENCING_LOGGING_TEST_VALUE = LoggingLevel.fine;
	public static final LoggingLevel SEQUENCING_LOGGING_TEST_VALUE_2 = LoggingLevel.finer;

	public static final String EJB_LOGGING_KEY = Logging2_0.ECLIPSELINK_EJB_CATEGORY_LOGGING_LEVEL;
	public static final LoggingLevel EJB_LOGGING_TEST_VALUE = LoggingLevel.finest;
	public static final LoggingLevel EJB_LOGGING_TEST_VALUE_2 = LoggingLevel.all;

	public static final String DMS_LOGGING_KEY = Logging2_0.ECLIPSELINK_DMS_CATEGORY_LOGGING_LEVEL;
	public static final LoggingLevel DMS_LOGGING_TEST_VALUE = LoggingLevel.off;
	public static final LoggingLevel DMS_LOGGING_TEST_VALUE_2 = LoggingLevel.severe;

	public static final String WEAVER_LOGGING_KEY = Logging2_0.ECLIPSELINK_WEAVER_CATEGORY_LOGGING_LEVEL;
	public static final LoggingLevel WEAVER_LOGGING_TEST_VALUE = LoggingLevel.finer;
	public static final LoggingLevel WEAVER_LOGGING_TEST_VALUE_2 = LoggingLevel.finest;

	public static final String PROPERTIES_LOGGING_KEY = Logging2_0.ECLIPSELINK_PROPERTIES_CATEGORY_LOGGING_LEVEL;
	public static final LoggingLevel PROPERTIES_LOGGING_TEST_VALUE = LoggingLevel.all;
	public static final LoggingLevel PROPERTIES_LOGGING_TEST_VALUE_2 = LoggingLevel.off;

	public static final String SERVER_LOGGING_KEY = Logging2_0.ECLIPSELINK_SERVER_CATEGORY_LOGGING_LEVEL;
	public static final LoggingLevel SERVER_LOGGING_TEST_VALUE = LoggingLevel.severe;
	public static final LoggingLevel SERVER_LOGGING_TEST_VALUE_2 = LoggingLevel.warning;

	// logging categories introduced by EclipseLink 2.4
	
	public static final String METADATA_LOGGING_KEY = Logging2_4.ECLIPSELINK_METADATA_CATEGORY_LOGGING_LEVEL;
	public static final LoggingLevel METADATA_LOGGING_TEST_VALUE = LoggingLevel.warning;
	public static final LoggingLevel METADATA_LOGGING_TEST_VALUE_2 = LoggingLevel.info;

	public static final String METAMODEL_LOGGING_KEY = Logging2_4.ECLIPSELINK_METAMODEL_CATEGORY_LOGGING_LEVEL;
	public static final LoggingLevel METAMODEL_LOGGING_TEST_VALUE = LoggingLevel.config;
	public static final LoggingLevel METAMODEL_LOGGING_TEST_VALUE_2 = LoggingLevel.fine;

	public static final String JPA_LOGGING_KEY = Logging2_4.ECLIPSELINK_JPA_CATEGORY_LOGGING_LEVEL;
	public static final LoggingLevel JPA_LOGGING_TEST_VALUE = LoggingLevel.all;
	public static final LoggingLevel JPA_LOGGING_TEST_VALUE_2 = LoggingLevel.off;

	public static final String DDL_LOGGING_KEY = Logging2_4.ECLIPSELINK_DDL_CATEGORY_LOGGING_LEVEL;
	public static final LoggingLevel DDL_LOGGING_TEST_VALUE = LoggingLevel.severe;
	public static final LoggingLevel DDL_LOGGING_TEST_VALUE_2 = LoggingLevel.warning;

	// ********** constructors **********
	public EclipseLink2_4LoggingTests(String name) {
		super(name);
	}

	@Override
	protected IDataModel buildJpaConfigDataModel() {
		IDataModel dataModel = super.buildJpaConfigDataModel();
		dataModel.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, JpaFacet.VERSION_2_0.getVersionString());	
		dataModel.setProperty(JpaFacetDataModelProperties.PLATFORM, EclipseLinkPlatform.VERSION_2_4);
		return dataModel;
	}
	
	// ********** behavior **********
	@Override
	protected void setUp() throws Exception {
		super.setUp();
		this.logging = (Logging2_0) this.subject.getLogging();
		PropertyChangeListener propertyChangeListener = this.buildPropertyChangeListener();
		
		this.logging.addPropertyChangeListener(Logging2_0.SQL_CATEGORY_LOGGING_PROPERTY, propertyChangeListener);
		this.logging.addPropertyChangeListener(Logging2_0.TRANSACTION_CATEGORY_LOGGING_PROPERTY, propertyChangeListener);
		this.logging.addPropertyChangeListener(Logging2_0.EVENT_CATEGORY_LOGGING_PROPERTY, propertyChangeListener);
		this.logging.addPropertyChangeListener(Logging2_0.CONNECTION_CATEGORY_LOGGING_PROPERTY, propertyChangeListener);
		this.logging.addPropertyChangeListener(Logging2_0.QUERY_CATEGORY_LOGGING_PROPERTY, propertyChangeListener);
		this.logging.addPropertyChangeListener(Logging2_0.CACHE_CATEGORY_LOGGING_PROPERTY, propertyChangeListener);
		this.logging.addPropertyChangeListener(Logging2_0.PROPAGATION_CATEGORY_LOGGING_PROPERTY, propertyChangeListener);
		this.logging.addPropertyChangeListener(Logging2_0.SEQUENCING_CATEGORY_LOGGING_PROPERTY, propertyChangeListener);
		this.logging.addPropertyChangeListener(Logging2_0.EJB_CATEGORY_LOGGING_PROPERTY, propertyChangeListener);
		this.logging.addPropertyChangeListener(Logging2_0.DMS_CATEGORY_LOGGING_PROPERTY, propertyChangeListener);
		this.logging.addPropertyChangeListener(Logging2_0.WEAVER_CATEGORY_LOGGING_PROPERTY, propertyChangeListener);
		this.logging.addPropertyChangeListener(Logging2_0.PROPERTIES_CATEGORY_LOGGING_PROPERTY, propertyChangeListener);
		this.logging.addPropertyChangeListener(Logging2_0.SERVER_CATEGORY_LOGGING_PROPERTY, propertyChangeListener);

		this.logging.addPropertyChangeListener(Logging2_4.METADATA_CATEGORY_LOGGING_PROPERTY, propertyChangeListener);
		this.logging.addPropertyChangeListener(Logging2_4.METAMODEL_CATEGORY_LOGGING_PROPERTY, propertyChangeListener);
		this.logging.addPropertyChangeListener(Logging2_4.JPA_CATEGORY_LOGGING_PROPERTY, propertyChangeListener);
		this.logging.addPropertyChangeListener(Logging2_4.DDL_CATEGORY_LOGGING_PROPERTY, propertyChangeListener);

		this.clearEvent();
	}

	/**
	 * Initializes directly the PersistenceUnit properties before testing.
	 */
	@Override
	protected void populatePu() {
		this.modelPropertiesSizeOriginal = 15; // PersistenceUnit properties
		this.propertiesTotal = this.modelPropertiesSizeOriginal + 1; // 1 misc properties
		this.modelPropertiesSize = this.modelPropertiesSizeOriginal;
		
		// Initializes PersistenceUnit properties
		this.persistenceUnitSetProperty("misc.property.1", "value.1");
		this.persistenceUnitSetProperty(SQL_LOGGING_KEY, SQL_LOGGING_TEST_VALUE);
		this.persistenceUnitSetProperty(TRANSACTION_LOGGING_KEY, TRANSACTION_LOGGING_TEST_VALUE);
		this.persistenceUnitSetProperty(EVENT_LOGGING_KEY, EVENT_LOGGING_TEST_VALUE);
		this.persistenceUnitSetProperty(CONNECTION_LOGGING_KEY, CONNECTION_LOGGING_TEST_VALUE);
		this.persistenceUnitSetProperty(QUERY_LOGGING_KEY, QUERY_LOGGING_TEST_VALUE);
		this.persistenceUnitSetProperty(CACHE_LOGGING_KEY, CACHE_LOGGING_TEST_VALUE);
		this.persistenceUnitSetProperty(PROPAGATION_LOGGING_KEY, PROPAGATION_LOGGING_TEST_VALUE);
		this.persistenceUnitSetProperty(SEQUENCING_LOGGING_KEY, SEQUENCING_LOGGING_TEST_VALUE);
		this.persistenceUnitSetProperty(EJB_LOGGING_KEY, EJB_LOGGING_TEST_VALUE);
		this.persistenceUnitSetProperty(DMS_LOGGING_KEY, DMS_LOGGING_TEST_VALUE);
		this.persistenceUnitSetProperty(WEAVER_LOGGING_KEY, WEAVER_LOGGING_TEST_VALUE);
		this.persistenceUnitSetProperty(PROPERTIES_LOGGING_KEY, PROPERTIES_LOGGING_TEST_VALUE);
		this.persistenceUnitSetProperty(SERVER_LOGGING_KEY, SERVER_LOGGING_TEST_VALUE);		
		
		this.persistenceUnitSetProperty(METADATA_LOGGING_KEY, METADATA_LOGGING_TEST_VALUE);
		this.persistenceUnitSetProperty(METAMODEL_LOGGING_KEY, METAMODEL_LOGGING_TEST_VALUE);
		this.persistenceUnitSetProperty(JPA_LOGGING_KEY, JPA_LOGGING_TEST_VALUE);
		this.persistenceUnitSetProperty(DDL_LOGGING_KEY, DDL_LOGGING_TEST_VALUE);

	}

	@Override
	protected PersistenceUnitProperties getModel() {
		return this.logging;
	}

	@Override
	protected Object getProperty(String propertyName) throws NoSuchFieldException {
		
		return this.logging.getLevel(propertyName);
	}

	@Override
	protected void setProperty(String propertyName, Object newValue) throws Exception {

		this.logging.setLevel(propertyName, (LoggingLevel) newValue);
	}
	
	// ********** Sql Level tests **********
	public void testSetSqlLoggingLevel() throws Exception {
		this.verifyModelInitialized(
			SQL_LOGGING_KEY,
			SQL_LOGGING_TEST_VALUE);
		this.verifySetProperty(
			SQL_LOGGING_KEY,
			SQL_LOGGING_TEST_VALUE,
			SQL_LOGGING_TEST_VALUE_2);
	}

	public void testAddRemoveSqlLoggingLevel() throws Exception {
		this.verifyAddRemoveProperty(
			SQL_LOGGING_KEY,
			SQL_LOGGING_TEST_VALUE,
			SQL_LOGGING_TEST_VALUE_2);
	}
	
	// ********** Transaction Level tests **********
	public void testSetTransactionLoggingLevel() throws Exception {
		this.verifyModelInitialized(
			TRANSACTION_LOGGING_KEY,
			TRANSACTION_LOGGING_TEST_VALUE);
		this.verifySetProperty(
			TRANSACTION_LOGGING_KEY,
			TRANSACTION_LOGGING_TEST_VALUE,
			TRANSACTION_LOGGING_TEST_VALUE_2);
	}

	public void testAddRemoveTransactionLoggingLevel() throws Exception {
		this.verifyAddRemoveProperty(
			TRANSACTION_LOGGING_KEY,
			TRANSACTION_LOGGING_TEST_VALUE,
			TRANSACTION_LOGGING_TEST_VALUE_2);
	}
	
	// ********** Event Level tests **********
	public void testSetEventLoggingLevel() throws Exception {
		this.verifyModelInitialized(
			EVENT_LOGGING_KEY,
			EVENT_LOGGING_TEST_VALUE);
		this.verifySetProperty(
			EVENT_LOGGING_KEY,
			EVENT_LOGGING_TEST_VALUE,
			EVENT_LOGGING_TEST_VALUE_2);
	}

	public void testAddRemoveEventLoggingLevel() throws Exception {
		this.verifyAddRemoveProperty(
			EVENT_LOGGING_KEY,
			EVENT_LOGGING_TEST_VALUE,
			EVENT_LOGGING_TEST_VALUE_2);
	}
	
	// ********** Connection Level tests **********
	public void testSetConnectionLoggingLevel() throws Exception {
		this.verifyModelInitialized(
			CONNECTION_LOGGING_KEY,
			CONNECTION_LOGGING_TEST_VALUE);
		this.verifySetProperty(
			CONNECTION_LOGGING_KEY,
			CONNECTION_LOGGING_TEST_VALUE,
			CONNECTION_LOGGING_TEST_VALUE_2);
	}

	public void testAddRemoveConnectionLoggingLevel() throws Exception {
		this.verifyAddRemoveProperty(
			CONNECTION_LOGGING_KEY,
			CONNECTION_LOGGING_TEST_VALUE,
			CONNECTION_LOGGING_TEST_VALUE_2);
	}
	
	// ********** Query Level tests **********
	public void testSetQueryLoggingLevel() throws Exception {
		this.verifyModelInitialized(
			QUERY_LOGGING_KEY,
			QUERY_LOGGING_TEST_VALUE);
		this.verifySetProperty(
			QUERY_LOGGING_KEY,
			QUERY_LOGGING_TEST_VALUE,
			QUERY_LOGGING_TEST_VALUE_2);
	}

	public void testAddRemoveQueryLoggingLevel() throws Exception {
		this.verifyAddRemoveProperty(
			QUERY_LOGGING_KEY,
			QUERY_LOGGING_TEST_VALUE,
			QUERY_LOGGING_TEST_VALUE_2);
	}
	
	// ********** Cache Level tests **********
	public void testSetCacheLoggingLevel() throws Exception {
		this.verifyModelInitialized(
			CACHE_LOGGING_KEY,
			CACHE_LOGGING_TEST_VALUE);
		this.verifySetProperty(
			CACHE_LOGGING_KEY,
			CACHE_LOGGING_TEST_VALUE,
			CACHE_LOGGING_TEST_VALUE_2);
	}

	public void testAddRemoveCacheLoggingLevel() throws Exception {
		this.verifyAddRemoveProperty(
			CACHE_LOGGING_KEY,
			CACHE_LOGGING_TEST_VALUE,
			CACHE_LOGGING_TEST_VALUE_2);
	}
	
	// ********** Propagation Level tests **********
	public void testSetPropagationLoggingLevel() throws Exception {
		this.verifyModelInitialized(
			PROPAGATION_LOGGING_KEY,
			PROPAGATION_LOGGING_TEST_VALUE);
		this.verifySetProperty(
			PROPAGATION_LOGGING_KEY,
			PROPAGATION_LOGGING_TEST_VALUE,
			PROPAGATION_LOGGING_TEST_VALUE_2);
	}

	public void testAddRemovePropagationLoggingLevel() throws Exception {
		this.verifyAddRemoveProperty(
			PROPAGATION_LOGGING_KEY,
			PROPAGATION_LOGGING_TEST_VALUE,
			PROPAGATION_LOGGING_TEST_VALUE_2);
	}
	
	// ********** Sequencing Level tests **********
	public void testSetSequencingLoggingLevel() throws Exception {
		this.verifyModelInitialized(
			SEQUENCING_LOGGING_KEY,
			SEQUENCING_LOGGING_TEST_VALUE);
		this.verifySetProperty(
			SEQUENCING_LOGGING_KEY,
			SEQUENCING_LOGGING_TEST_VALUE,
			SEQUENCING_LOGGING_TEST_VALUE_2);
	}

	public void testAddRemoveSequencingLoggingLevel() throws Exception {
		this.verifyAddRemoveProperty(
			SEQUENCING_LOGGING_KEY,
			SEQUENCING_LOGGING_TEST_VALUE,
			SEQUENCING_LOGGING_TEST_VALUE_2);
	}
	
	// ********** EJB Level tests **********
	public void testSetEJBLoggingLevel() throws Exception {
		this.verifyModelInitialized(
			EJB_LOGGING_KEY,
			EJB_LOGGING_TEST_VALUE);
		this.verifySetProperty(
			EJB_LOGGING_KEY,
			EJB_LOGGING_TEST_VALUE,
			EJB_LOGGING_TEST_VALUE_2);
	}

	public void testAddRemoveEJBLoggingLevel() throws Exception {
		this.verifyAddRemoveProperty(
			EJB_LOGGING_KEY,
			EJB_LOGGING_TEST_VALUE,
			EJB_LOGGING_TEST_VALUE_2);
	}
	
	// ********** DMS Level tests **********
	public void testSetDMSLoggingLevel() throws Exception {
		this.verifyModelInitialized(
			DMS_LOGGING_KEY,
			DMS_LOGGING_TEST_VALUE);
		this.verifySetProperty(
			DMS_LOGGING_KEY,
			DMS_LOGGING_TEST_VALUE,
			DMS_LOGGING_TEST_VALUE_2);
	}

	public void testAddRemoveDMSLoggingLevel() throws Exception {
		this.verifyAddRemoveProperty(
			DMS_LOGGING_KEY,
			DMS_LOGGING_TEST_VALUE,
			DMS_LOGGING_TEST_VALUE_2);
	}
	
	// ********** Weaver Level tests **********
	public void testSetWeaverLoggingLevel() throws Exception {
		this.verifyModelInitialized(
			WEAVER_LOGGING_KEY,
			WEAVER_LOGGING_TEST_VALUE);
		this.verifySetProperty(
			WEAVER_LOGGING_KEY,
			WEAVER_LOGGING_TEST_VALUE,
			WEAVER_LOGGING_TEST_VALUE_2);
	}

	public void testAddRemoveWeaverLoggingLevel() throws Exception {
		this.verifyAddRemoveProperty(
			WEAVER_LOGGING_KEY,
			WEAVER_LOGGING_TEST_VALUE,
			WEAVER_LOGGING_TEST_VALUE_2);
	}
	
	// ********** Properties Level tests **********
	public void testSetPropertiesLoggingLevel() throws Exception {
		this.verifyModelInitialized(
			PROPERTIES_LOGGING_KEY,
			PROPERTIES_LOGGING_TEST_VALUE);
		this.verifySetProperty(
			PROPERTIES_LOGGING_KEY,
			PROPERTIES_LOGGING_TEST_VALUE,
			PROPERTIES_LOGGING_TEST_VALUE_2);
	}

	public void testAddRemovePropertiesLoggingLevel() throws Exception {
		this.verifyAddRemoveProperty(
			PROPERTIES_LOGGING_KEY,
			PROPERTIES_LOGGING_TEST_VALUE,
			PROPERTIES_LOGGING_TEST_VALUE_2);
	}
	
	// ********** Server Level tests **********
	public void testSetServerLoggingLevel() throws Exception {
		this.verifyModelInitialized(
			SERVER_LOGGING_KEY,
			SERVER_LOGGING_TEST_VALUE);
		this.verifySetProperty(
			SERVER_LOGGING_KEY,
			SERVER_LOGGING_TEST_VALUE,
			SERVER_LOGGING_TEST_VALUE_2);
	}

	public void testAddRemoveServerLoggingLevel() throws Exception {
		this.verifyAddRemoveProperty(
			SERVER_LOGGING_KEY,
			SERVER_LOGGING_TEST_VALUE,
			SERVER_LOGGING_TEST_VALUE_2);
	}
	
	// ********** Metadata Level tests **********
	public void testSetMetadataLoggingLevel() throws Exception {
		this.verifyModelInitialized(
			METADATA_LOGGING_KEY,
			METADATA_LOGGING_TEST_VALUE);
		this.verifySetProperty(
			METADATA_LOGGING_KEY,
			METADATA_LOGGING_TEST_VALUE,
			METADATA_LOGGING_TEST_VALUE_2);
	}

	public void testAddRemoveMetadataLoggingLevel() throws Exception {
		this.verifyAddRemoveProperty(
			METADATA_LOGGING_KEY,
			METADATA_LOGGING_TEST_VALUE,
			METADATA_LOGGING_TEST_VALUE_2);
	}
	
	// ********** Metamodel Level tests **********
	public void testSetMetamodelLoggingLevel() throws Exception {
		this.verifyModelInitialized(
			METAMODEL_LOGGING_KEY,
			METAMODEL_LOGGING_TEST_VALUE);
		this.verifySetProperty(
			METAMODEL_LOGGING_KEY,
			METAMODEL_LOGGING_TEST_VALUE,
			METAMODEL_LOGGING_TEST_VALUE_2);
	}

	public void testAddRemoveMetamodelLoggingLevel() throws Exception {
		this.verifyAddRemoveProperty(
			METAMODEL_LOGGING_KEY,
			METAMODEL_LOGGING_TEST_VALUE,
			METAMODEL_LOGGING_TEST_VALUE_2);
	}

	// ********** JPA Level tests **********
	public void testSetJPALoggingLevel() throws Exception {
		this.verifyModelInitialized(
			JPA_LOGGING_KEY,
			JPA_LOGGING_TEST_VALUE);
		this.verifySetProperty(
			JPA_LOGGING_KEY,
			JPA_LOGGING_TEST_VALUE,
			JPA_LOGGING_TEST_VALUE_2);
	}

	public void testAddRemoveJPALoggingLevel() throws Exception {
		this.verifyAddRemoveProperty(
			JPA_LOGGING_KEY,
			JPA_LOGGING_TEST_VALUE,
			JPA_LOGGING_TEST_VALUE_2);
	}
	
	// ********** DDL Level tests **********
	public void testSetDDLLoggingLevel() throws Exception {
		this.verifyModelInitialized(
			DDL_LOGGING_KEY,
			DDL_LOGGING_TEST_VALUE);
		this.verifySetProperty(
			DDL_LOGGING_KEY,
			DDL_LOGGING_TEST_VALUE,
			DDL_LOGGING_TEST_VALUE_2);
	}

	public void testAddRemoveDDLLoggingLevel() throws Exception {
		this.verifyAddRemoveProperty(
			DDL_LOGGING_KEY,
			DDL_LOGGING_TEST_VALUE,
			DDL_LOGGING_TEST_VALUE_2);
	}
}

Back to the top