blob: fa596acaf4ff929bdeae4222a0d0294ca842e32b (
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
|
/*******************************************************************************
* Copyright (c) 2001, 2007 Oracle Corporation and others.
* 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 Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jst.jsf.facesconfig.tests.read;
import org.eclipse.jst.jsf.core.IJSFCoreConstants;
import org.eclipse.jst.jsf.facesconfig.emf.DynamicElement;
import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigExtensionType;
import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
public class ReadFacesConfigElementsTestCase_1_2 extends
ReadFacesConfigElementsTestCase
{
public ReadFacesConfigElementsTestCase_1_2(String name) {
super(name);
}
protected void initialize(TestConfiguration testConfiguration) {
// override base when not in a configurable test suite
if(_testConfiguration == null)
{
_facesConfigFile = "WEB-INF/faces-config_1_2.xml";
_facesVersion = IJSFCoreConstants.JSF_VERSION_1_2;
}
else
{
super.initialize(testConfiguration);
}
}
public void testFacesConfigExtension() {
FacesConfigArtifactEdit edit = null;
try {
edit = getArtifactEditForRead();
assertNotNull(edit.getFacesConfig());
assertEquals(1, edit.getFacesConfig().getFacesConfigExtension().size());
FacesConfigExtensionType facesConfigExt =
(FacesConfigExtensionType) edit.getFacesConfig().getFacesConfigExtension().get(0);
assertEquals(1, facesConfigExt.getChildNodes().size());
DynamicElement element = (DynamicElement) facesConfigExt.getChildNodes().get(0);
assertEquals("faces-config-extended-data", element.getName());
} finally {
if (edit != null) {
edit.dispose();
}
}
}
}
|