<< ADD DESCRIPTION HERE http://java.net/jira/browse/JAVASERVERFACES-XXXX >> SECTION: Modified Files ---------------------------- M test/glassfish/pom.xml M test/weblogic/wls1214/pom.xml A test/glassfish/facelets A test/glassfish/facelets/core A test/glassfish/facelets/core/main A test/glassfish/facelets/core/main/java A test/glassfish/facelets/core/main/java/com A test/glassfish/facelets/core/main/java/com/sun A test/glassfish/facelets/core/main/java/com/sun/faces A test/glassfish/facelets/core/main/java/com/sun/faces/annotation A test/glassfish/facelets/core/main/java/com/sun/faces/annotation/AnnotatedValidatorNoValue.java A test/glassfish/facelets/core/main/java/com/sun/faces/annotation/AnnotationTestBean.java A test/glassfish/facelets/core/main/webapp A test/glassfish/facelets/core/main/webapp/WEB-INF A test/glassfish/facelets/core/main/webapp/WEB-INF/faces-config.xml A test/glassfish/facelets/core/main/webapp/WEB-INF/web.xml A test/glassfish/facelets/core/main/webapp/annotationtest.xhtml A test/glassfish/facelets/core/pom.xml A test/glassfish/facelets/core/test A test/glassfish/facelets/core/test/java A test/glassfish/facelets/core/test/java/com A test/glassfish/facelets/core/test/java/com/sun A test/glassfish/facelets/core/test/java/com/sun/faces A test/glassfish/facelets/core/test/java/com/sun/faces/annotation A test/glassfish/facelets/core/test/java/com/sun/faces/annotation/AnnotatedComponentsITCase.java A test/glassfish/facelets/pom.xml A test/weblogic/wls1214/facelets A test/weblogic/wls1214/facelets/core A test/weblogic/wls1214/facelets/core/main A test/weblogic/wls1214/facelets/core/main/java A test/weblogic/wls1214/facelets/core/main/java/com A test/weblogic/wls1214/facelets/core/main/java/com/sun A test/weblogic/wls1214/facelets/core/main/java/com/sun/faces A test/weblogic/wls1214/facelets/core/main/java/com/sun/faces/annotation A test/weblogic/wls1214/facelets/core/main/java/com/sun/faces/annotation/AnnotatedValidatorNoValue.java A test/weblogic/wls1214/facelets/core/main/java/com/sun/faces/annotation/AnnotationTestBean.java A test/weblogic/wls1214/facelets/core/main/webapp A test/weblogic/wls1214/facelets/core/main/webapp/WEB-INF A test/weblogic/wls1214/facelets/core/main/webapp/WEB-INF/faces-config.xml A test/weblogic/wls1214/facelets/core/main/webapp/WEB-INF/web.xml A test/weblogic/wls1214/facelets/core/main/webapp/annotationtest.xhtml A test/weblogic/wls1214/facelets/core/pom.xml A test/weblogic/wls1214/facelets/core/test A test/weblogic/wls1214/facelets/core/test/java A test/weblogic/wls1214/facelets/core/test/java/com A test/weblogic/wls1214/facelets/core/test/java/com/sun A test/weblogic/wls1214/facelets/core/test/java/com/sun/faces A test/weblogic/wls1214/facelets/core/test/java/com/sun/faces/annotation A test/weblogic/wls1214/facelets/core/test/java/com/sun/faces/annotation/AnnotatedComponentsITCase.java A test/weblogic/wls1214/facelets/pom.xml SECTION: Diffs ---------------------------- Index: test/glassfish/facelets/core/main/java/com/sun/faces/annotation/AnnotatedValidatorNoValue.java =================================================================== --- test/glassfish/facelets/core/main/java/com/sun/faces/annotation/AnnotatedValidatorNoValue.java (revision 0) +++ test/glassfish/facelets/core/main/java/com/sun/faces/annotation/AnnotatedValidatorNoValue.java (working copy) @@ -0,0 +1,64 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.sun.faces.annotation; + +import javax.faces.validator.Validator; +import javax.faces.validator.ValidatorException; +import javax.faces.validator.FacesValidator; +import javax.faces.context.FacesContext; +import javax.faces.component.UIComponent; + +@FacesValidator +public class AnnotatedValidatorNoValue implements Validator { + public void validate(FacesContext context, + UIComponent component, + Object value) throws ValidatorException { + return; + } + + private String welcomeMessage ="AnnotatedValidatorNoValue"; + + public String getWelcomeMessage() { + return welcomeMessage; + } + +} + Index: test/glassfish/facelets/core/main/java/com/sun/faces/annotation/AnnotationTestBean.java =================================================================== --- test/glassfish/facelets/core/main/java/com/sun/faces/annotation/AnnotationTestBean.java (revision 0) +++ test/glassfish/facelets/core/main/java/com/sun/faces/annotation/AnnotationTestBean.java (working copy) @@ -0,0 +1,109 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.sun.faces.annotation; + +import java.util.Set; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.faces.FacesException; +import javax.faces.application.Application; +import javax.faces.context.FacesContext; +import javax.faces.validator.Validator; + +public class AnnotationTestBean { + + public String getTestResult() { + + try { + testAnnotatedComponentsWebInfClasses(); + return Boolean.TRUE.toString(); + } catch (Exception e) { + Logger.getAnonymousLogger().log(Level.SEVERE, + "AnnotationTestBean validation failure!", + e); + return Boolean.FALSE.toString(); + } + } + + private void testAnnotatedComponentsWebInfClasses() throws Exception { + FacesContext ctx = FacesContext.getCurrentInstance(); + Application app = ctx.getApplication(); + Validator v = app.createValidator("annotatedValidatorNoValue"); + + assertNotNull(v); + assertTrue(v instanceof AnnotatedValidatorNoValue); + Set defaultValidatorIds = app.getDefaultValidatorInfo().keySet(); + assertFalse(defaultValidatorIds.contains("AnnotatedValidatorNoValue")); + String welcomeMessage = ((AnnotatedValidatorNoValue)v).getWelcomeMessage(); + assertTrue(welcomeMessage.equals("AnnotatedValidatorNoValue")); + + boolean exceptionThrown = false; + v = null; + try { + v = app.createValidator("AnnotatedValidatorNoValue"); + } + catch (FacesException fe) { + assertTrue(null == v); + exceptionThrown = true; + } + assertTrue(exceptionThrown); + + } + + private void assertNotNull(Object v) { + if (v == null) { + throw new RuntimeException(); + } + } + + private void assertTrue(boolean t) { + if (!t) { + throw new RuntimeException(); + } + } + + private void assertFalse(boolean t) { + if (t) { + throw new RuntimeException(); + } + } + +} Index: test/glassfish/facelets/core/main/webapp/WEB-INF/faces-config.xml =================================================================== --- test/glassfish/facelets/core/main/webapp/WEB-INF/faces-config.xml (revision 0) +++ test/glassfish/facelets/core/main/webapp/WEB-INF/faces-config.xml (working copy) @@ -0,0 +1,54 @@ + + + + + + annotationTestBean + com.sun.faces.annotation.AnnotationTestBean + request + + + \ No newline at end of file Index: test/glassfish/facelets/core/main/webapp/WEB-INF/web.xml =================================================================== --- test/glassfish/facelets/core/main/webapp/WEB-INF/web.xml (revision 0) +++ test/glassfish/facelets/core/main/webapp/WEB-INF/web.xml (working copy) @@ -0,0 +1,24 @@ + + + + javax.faces.PROJECT_STAGE + Development + + + Faces Servlet + javax.faces.webapp.FacesServlet + 1 + + + Faces Servlet + /faces/* + + + + 30 + + + + faces/annotationtest.xhtml + + Index: test/glassfish/facelets/core/main/webapp/annotationtest.xhtml =================================================================== --- test/glassfish/facelets/core/main/webapp/annotationtest.xhtml (revision 0) +++ test/glassfish/facelets/core/main/webapp/annotationtest.xhtml (working copy) @@ -0,0 +1,17 @@ + + + + Annotation Scanning Test Case + + + + + + + + + Index: test/glassfish/facelets/core/pom.xml =================================================================== --- test/glassfish/facelets/core/pom.xml (revision 0) +++ test/glassfish/facelets/core/pom.xml (working copy) @@ -0,0 +1,70 @@ + + + + + + 4.0.0 + + com.sun.faces.test.glassfish.facelets + pom + 2.2.8-SNAPSHOT + + com.sun.faces.test.glassfish.facelets + core + war + Mojarra ${project.version} - Test - Glassfish - Facelets - Core + + jsf-glassfish-AnnotationValidatorTest + + + + net.sourceforge.htmlunit + htmlunit + 2.4 + test + + + + UTF-8 + + Index: test/glassfish/facelets/core/test/java/com/sun/faces/annotation/AnnotatedComponentsITCase.java =================================================================== --- test/glassfish/facelets/core/test/java/com/sun/faces/annotation/AnnotatedComponentsITCase.java (revision 0) +++ test/glassfish/facelets/core/test/java/com/sun/faces/annotation/AnnotatedComponentsITCase.java (working copy) @@ -0,0 +1,84 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.sun.faces.annotation; + +import java.util.List; +import java.util.ArrayList; + + +import com.sun.faces.htmlunit.HtmlUnitFacesITCase; +import com.gargoylesoftware.htmlunit.html.HtmlPage; +import com.gargoylesoftware.htmlunit.html.HtmlSpan; +import junit.framework.Test; +import junit.framework.TestSuite; + + +public class AnnotatedComponentsITCase extends HtmlUnitFacesITCase { + + + // ----------------------- Constructors + + + public AnnotatedComponentsITCase(String name) { + super(name); + } + + /** + * Return the tests included in this test suite. + */ + public static Test suite() { + return (new TestSuite(AnnotatedComponentsITCase.class)); + } + + + // ----------------------- Test Methods + + + public void testAnnotations() throws Exception { + HtmlPage page = getPage("/faces/annotationtest.xhtml"); + + List output = new ArrayList(1); + getAllElementsOfGivenClass(page, output, HtmlSpan.class); + assertTrue(output.size() == 1); + HtmlSpan span = output.get(0); + assertTrue(span.asText().contains("true")); + } +} Index: test/glassfish/facelets/pom.xml =================================================================== --- test/glassfish/facelets/pom.xml (revision 0) +++ test/glassfish/facelets/pom.xml (working copy) @@ -0,0 +1,60 @@ + + + + + + 4.0.0 + + com.sun.faces.test.glassfish + pom + 2.2.8-SNAPSHOT + + com.sun.faces.test.glassfish.facelets + pom + pom + Mojarra ${project.version} - Test - Glassfish - Facelets + + core + + + Index: test/glassfish/pom.xml =================================================================== --- test/glassfish/pom.xml (revision 13488) +++ test/glassfish/pom.xml (working copy) @@ -66,5 +66,6 @@ request_char_encoding request_char_encoding2 undeploy + facelets Index: test/weblogic/wls1214/facelets/core/main/java/com/sun/faces/annotation/AnnotatedValidatorNoValue.java =================================================================== --- test/weblogic/wls1214/facelets/core/main/java/com/sun/faces/annotation/AnnotatedValidatorNoValue.java (revision 0) +++ test/weblogic/wls1214/facelets/core/main/java/com/sun/faces/annotation/AnnotatedValidatorNoValue.java (working copy) @@ -0,0 +1,64 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.sun.faces.annotation; + +import javax.faces.validator.Validator; +import javax.faces.validator.ValidatorException; +import javax.faces.validator.FacesValidator; +import javax.faces.context.FacesContext; +import javax.faces.component.UIComponent; + +@FacesValidator +public class AnnotatedValidatorNoValue implements Validator { + public void validate(FacesContext context, + UIComponent component, + Object value) throws ValidatorException { + return; + } + + private String welcomeMessage ="AnnotatedValidatorNoValue"; + + public String getWelcomeMessage() { + return welcomeMessage; + } + +} + Index: test/weblogic/wls1214/facelets/core/main/java/com/sun/faces/annotation/AnnotationTestBean.java =================================================================== --- test/weblogic/wls1214/facelets/core/main/java/com/sun/faces/annotation/AnnotationTestBean.java (revision 0) +++ test/weblogic/wls1214/facelets/core/main/java/com/sun/faces/annotation/AnnotationTestBean.java (working copy) @@ -0,0 +1,109 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.sun.faces.annotation; + +import java.util.Set; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.faces.FacesException; +import javax.faces.application.Application; +import javax.faces.context.FacesContext; +import javax.faces.validator.Validator; + +public class AnnotationTestBean { + + public String getTestResult() { + + try { + testAnnotatedComponentsWebInfClasses(); + return Boolean.TRUE.toString(); + } catch (Exception e) { + Logger.getAnonymousLogger().log(Level.SEVERE, + "AnnotationTestBean validation failure!", + e); + return Boolean.FALSE.toString(); + } + } + + private void testAnnotatedComponentsWebInfClasses() throws Exception { + FacesContext ctx = FacesContext.getCurrentInstance(); + Application app = ctx.getApplication(); + Validator v = app.createValidator("annotatedValidatorNoValue"); + + assertNotNull(v); + assertTrue(v instanceof AnnotatedValidatorNoValue); + Set defaultValidatorIds = app.getDefaultValidatorInfo().keySet(); + assertFalse(defaultValidatorIds.contains("AnnotatedValidatorNoValue")); + String welcomeMessage = ((AnnotatedValidatorNoValue)v).getWelcomeMessage(); + assertTrue(welcomeMessage.equals("AnnotatedValidatorNoValue")); + + boolean exceptionThrown = false; + v = null; + try { + v = app.createValidator("AnnotatedValidatorNoValue"); + } + catch (FacesException fe) { + assertTrue(null == v); + exceptionThrown = true; + } + assertTrue(exceptionThrown); + + } + + private void assertNotNull(Object v) { + if (v == null) { + throw new RuntimeException(); + } + } + + private void assertTrue(boolean t) { + if (!t) { + throw new RuntimeException(); + } + } + + private void assertFalse(boolean t) { + if (t) { + throw new RuntimeException(); + } + } + +} Index: test/weblogic/wls1214/facelets/core/main/webapp/WEB-INF/faces-config.xml =================================================================== --- test/weblogic/wls1214/facelets/core/main/webapp/WEB-INF/faces-config.xml (revision 0) +++ test/weblogic/wls1214/facelets/core/main/webapp/WEB-INF/faces-config.xml (working copy) @@ -0,0 +1,54 @@ + + + + + + annotationTestBean + com.sun.faces.annotation.AnnotationTestBean + request + + + \ No newline at end of file Index: test/weblogic/wls1214/facelets/core/main/webapp/WEB-INF/web.xml =================================================================== --- test/weblogic/wls1214/facelets/core/main/webapp/WEB-INF/web.xml (revision 0) +++ test/weblogic/wls1214/facelets/core/main/webapp/WEB-INF/web.xml (working copy) @@ -0,0 +1,24 @@ + + + + javax.faces.PROJECT_STAGE + Development + + + Faces Servlet + javax.faces.webapp.FacesServlet + 1 + + + Faces Servlet + /faces/* + + + + 30 + + + + faces/annotationtest.xhtml + + Index: test/weblogic/wls1214/facelets/core/main/webapp/annotationtest.xhtml =================================================================== --- test/weblogic/wls1214/facelets/core/main/webapp/annotationtest.xhtml (revision 0) +++ test/weblogic/wls1214/facelets/core/main/webapp/annotationtest.xhtml (working copy) @@ -0,0 +1,17 @@ + + + + Annotation Scanning Test Case + + + + + + + + + Index: test/weblogic/wls1214/facelets/core/pom.xml =================================================================== --- test/weblogic/wls1214/facelets/core/pom.xml (revision 0) +++ test/weblogic/wls1214/facelets/core/pom.xml (working copy) @@ -0,0 +1,70 @@ + + + + + + 4.0.0 + + com.sun.faces.test.weblogic.wls1214.facelets + pom + 2.2.8-SNAPSHOT + + com.sun.faces.test.weblogic.wls1214.facelets + core + war + Mojarra ${project.version} - Test - Weblogic - Wls1214 - Facelets - Core + + jsf-wls1214-AnnotationValidatorTest + + + + net.sourceforge.htmlunit + htmlunit + 2.4 + test + + + + UTF-8 + + Index: test/weblogic/wls1214/facelets/core/test/java/com/sun/faces/annotation/AnnotatedComponentsITCase.java =================================================================== --- test/weblogic/wls1214/facelets/core/test/java/com/sun/faces/annotation/AnnotatedComponentsITCase.java (revision 0) +++ test/weblogic/wls1214/facelets/core/test/java/com/sun/faces/annotation/AnnotatedComponentsITCase.java (working copy) @@ -0,0 +1,84 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.sun.faces.annotation; + +import java.util.List; +import java.util.ArrayList; + + +import com.sun.faces.htmlunit.HtmlUnitFacesITCase; +import com.gargoylesoftware.htmlunit.html.HtmlPage; +import com.gargoylesoftware.htmlunit.html.HtmlSpan; +import junit.framework.Test; +import junit.framework.TestSuite; + + +public class AnnotatedComponentsITCase extends HtmlUnitFacesITCase { + + + // ----------------------- Constructors + + + public AnnotatedComponentsITCase(String name) { + super(name); + } + + /** + * Return the tests included in this test suite. + */ + public static Test suite() { + return (new TestSuite(AnnotatedComponentsITCase.class)); + } + + + // ----------------------- Test Methods + + + public void testAnnotations() throws Exception { + HtmlPage page = getPage("/faces/annotationtest.xhtml"); + + List output = new ArrayList(1); + getAllElementsOfGivenClass(page, output, HtmlSpan.class); + assertTrue(output.size() == 1); + HtmlSpan span = output.get(0); + assertTrue(span.asText().contains("true")); + } +} Index: test/weblogic/wls1214/facelets/pom.xml =================================================================== --- test/weblogic/wls1214/facelets/pom.xml (revision 0) +++ test/weblogic/wls1214/facelets/pom.xml (working copy) @@ -0,0 +1,60 @@ + + + + + + 4.0.0 + + com.sun.faces.test.weblogic.wls1214 + pom + 2.2.8-SNAPSHOT + + com.sun.faces.test.weblogic.wls1214.facelets + pom + pom + Mojarra ${project.version} - Test - Weblogic - WLS1214 - Facelets + + core + + + Index: test/weblogic/wls1214/pom.xml =================================================================== --- test/weblogic/wls1214/pom.xml (revision 13488) +++ test/weblogic/wls1214/pom.xml (working copy) @@ -49,9 +49,12 @@ pom 2.2.8-SNAPSHOT - com.sun.faces.test.weblogic - wls1214 + com.sun.faces.test.weblogic.wls1214 + pom pom Mojarra ${project.version} - Test - Weblogic - WLS 12.1.4 + + facelets + SECTION: New Files ---------------------------- SEE ATTACHMENTS