Author: scabanovich
Date: 2011-03-04 19:09:51 -0500 (Fri, 04 Mar 2011)
New Revision: 29525
Added:
branches/jbosstools-3.2.x/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/JSF2ComponentsInClassFolderTest.java
Modified:
branches/jbosstools-3.2.x/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java
Log:
JBIDE-8275
https://issues.jboss.org/browse/JBIDE-8275
Modified:
branches/jbosstools-3.2.x/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java
===================================================================
---
branches/jbosstools-3.2.x/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java 2011-03-04
23:45:57 UTC (rev 29524)
+++
branches/jbosstools-3.2.x/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java 2011-03-05
00:09:51 UTC (rev 29525)
@@ -29,6 +29,7 @@
import org.jboss.tools.jsf.test.refactoring.JSF2RefactoringTest;
import org.jboss.tools.jsf.test.refactoring.MessagePropertyRefactoringTest;
import org.jboss.tools.jsf.test.validation.ELValidatorTest;
+import org.jboss.tools.jsf.test.validation.JSF2ComponentsInClassFolderTest;
import org.jboss.tools.jsf.test.validation.JSF2ComponentsValidatorTest;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ProjectImportTestSetup;
@@ -67,7 +68,8 @@
new String[] { "projects/JSFKickStartOldFormat" }, //$NON-NLS-1$
new String[] { "JSFKickStartOldFormat" })); //$NON-NLS-1$
suite.addTest(new ProjectImportTestSetup(new TestSuite(
- JSF2ComponentsValidatorTest.class), "org.jboss.tools.jsf.test",
//$NON-NLS-1$
+ JSF2ComponentsValidatorTest.class,
+ JSF2ComponentsInClassFolderTest.class), "org.jboss.tools.jsf.test",
//$NON-NLS-1$
new String[] { "projects/JSF2ComponentsValidator" }, //$NON-NLS-1$
new String[] { "JSF2ComponentsValidator" })); //$NON-NLS-1$
suite.addTest(new ProjectImportTestSetup(new TestSuite(
Added:
branches/jbosstools-3.2.x/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/JSF2ComponentsInClassFolderTest.java
===================================================================
---
branches/jbosstools-3.2.x/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/JSF2ComponentsInClassFolderTest.java
(rev 0)
+++
branches/jbosstools-3.2.x/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/JSF2ComponentsInClassFolderTest.java 2011-03-05
00:09:51 UTC (rev 29525)
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jsf.test.validation;
+
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.jboss.tools.jsf.jsf2.util.JSF2ResourceUtil;
+import org.jboss.tools.jst.web.kb.IKbProject;
+import org.jboss.tools.jst.web.kb.KbProjectFactory;
+import org.jboss.tools.jst.web.kb.internal.KbProject;
+import org.jboss.tools.jst.web.kb.taglib.IAttribute;
+import org.jboss.tools.jst.web.kb.taglib.IComponent;
+import org.jboss.tools.jst.web.kb.taglib.ITagLibrary;
+import org.jboss.tools.test.util.ProjectImportTestSetup;
+
+import junit.framework.TestCase;
+
+/**
+ *
+ * @author yzhishko
+ *
+ */
+
+public class JSF2ComponentsInClassFolderTest extends TestCase {
+
+ private static String projectName = "JSF2ComponentsValidator"; //$NON-NLS-1$
+ private static IProject project;
+
+ public JSF2ComponentsInClassFolderTest() {
+ super("JSF 2 Components In Class Folder Test"); //$NON-NLS-1$
+ }
+
+ protected void setUp() throws Exception {
+ project = ProjectImportTestSetup.loadProject(projectName);
+ project.build(IncrementalProjectBuilder.FULL_BUILD,
+ new NullProgressMonitor());
+ }
+
+ public void testJSF2ComponentsInClassFolder() throws Exception {
+ IKbProject kb = KbProjectFactory.getKbProject(project, true);
+ ITagLibrary[] ls =
kb.getTagLibraries("http://java.sun.com/jsf/composite/example");
+ assertEquals(1, ls.length);
+ IComponent[] cs = ls[0].getComponents();
+ assertTrue(cs.length > 0);
+ assertEquals("input", cs[0].getName());
+ IAttribute[] as = cs[0].getAttributes();
+ assertEquals(5, as.length);
+ IAttribute a = cs[0].getAttribute("value7");
+ assertNotNull(a);
+
+ }
+
+}
+
+
Property changes on:
branches/jbosstools-3.2.x/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/JSF2ComponentsInClassFolderTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain