Author: mareshkau
Date: 2008-06-09 15:08:56 -0400 (Mon, 09 Jun 2008)
New Revision: 8651
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2297/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2297/JBIDE-2297.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1494Test.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2297Test.java
Removed:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1494.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
Log:
junit for
http://jira.jboss.com/jira/browse/JBIDE-2297, also was made some code
adjustment
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2297/JBIDE-2297.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2297/JBIDE-2297.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2297/JBIDE-2297.xhtml 2008-06-09
19:08:56 UTC (rev 8651)
@@ -0,0 +1,11 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core">
+
+ <ui:composition template="">
+<h:graphicImage value=" %=
request.getContextPath()%/images/logos/banner.png"/>ffffff
+ </ui:composition>
+
+</html>
\ No newline at end of file
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2008-06-09
18:46:31 UTC (rev 8650)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2008-06-09
19:08:56 UTC (rev 8651)
@@ -20,11 +20,12 @@
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE1460Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE1479Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE1484Test;
-import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE1494;
+import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE1494Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE1615Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE1720Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE1730Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE1744Test;
+import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE2297Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE675Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE788Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JsfJbide1467Test;
@@ -63,7 +64,8 @@
suite.addTestSuite(JBIDE1720Test.class);
suite.addTestSuite(JsfJbide1718Test.class);
suite.addTestSuite(JBIDE1730Test.class);
- suite.addTestSuite(JBIDE1494.class);
+ suite.addTestSuite(JBIDE1494Test.class);
+ suite.addTestSuite(JBIDE2297Test.class);
// $JUnit-END$
// added by Max Areshkau
// add here projects which should be imported for junit tests
Deleted:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1494.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1494.java 2008-06-09
18:46:31 UTC (rev 8650)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1494.java 2008-06-09
19:08:56 UTC (rev 8651)
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.jsf.vpe.jsf.test.jbide;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
-import org.jboss.tools.vpe.editor.VpeController;
-import org.jboss.tools.vpe.editor.template.VpeTemplate;
-import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
-import org.jboss.tools.vpe.ui.test.TestUtil;
-import org.jboss.tools.vpe.ui.test.VpeTest;
-import org.w3c.dom.Node;
-
-/**
- * @author mareshkau
- *
- */
-public class JBIDE1494 extends VpeTest{
-
- public static final String IMPORT_PROJECT_NAME = "jsfTest"; //$NON-NLS-1$
-
- private static final String TEST_PAGE_NAME = "JBIDE/1494/JBIDE-1494.xhtml";
//$NON-NLS-1$
-
- public JBIDE1494(String name) {
- super(name);
- }
-
- public void testJBIDE1494() throws Throwable {
- // wait
- TestUtil.waitForJobs();
- // set exception
- setException(null);
- // Tests CA
- // get test page path
- IFile file = (IFile) TestUtil.getComponentPath(TEST_PAGE_NAME,
- IMPORT_PROJECT_NAME);
- assertNotNull("Could not open specified file " + TEST_PAGE_NAME, file);
//$NON-NLS-1$
-
- IEditorInput input = new FileEditorInput(file);
-
- assertNotNull("Editor input is null", input); //$NON-NLS-1$
-
- // open and get editor
- JSPMultiPageEditor part = openEditor(input);
-
- StyledText styledText = part.getSourceEditor().getTextViewer()
- .getTextWidget();
-
- styledText.setCaretOffset(424);
- Node h_outputText = (Node) ContentAssistUtils.getNodeAt(part
- .getSourceEditor().getTextViewer(), 424);
-
- assertNotNull(h_outputText);
-
- VpeController vpeController = getVpeController(part);
-
- VpeTemplateManager templateManager=
vpeController.getPageContext().getVisualBuilder().getTemplateManager();
- assertNotNull(templateManager);
- Set<?> dependencySet = new HashSet();
- VpeTemplate h_output_template =
templateManager.getTemplate(vpeController.getPageContext(),h_outputText, dependencySet);
-
- assertNotNull(h_output_template.getTextFormatingData());
- //text formating for h:output
- assertEquals(7,h_output_template.getTextFormatingData().getAllFormatData().length);
-
- Node h_dataTable = (Node) ContentAssistUtils.getNodeAt(part
- .getSourceEditor().getTextViewer(), 473);
-
- assertNotNull(h_dataTable);
-
- dependencySet=new HashSet();
-
- VpeTemplate h_data_Table =
templateManager.getTemplate(vpeController.getPageContext(),h_dataTable , dependencySet);
-
- assertNotNull(h_data_Table.getTextFormatingData());
-
- assertEquals(8,h_data_Table.getTextFormatingData().getAllFormatData().length);
-
- Node span =(Node) ContentAssistUtils.getNodeAt(part
- .getSourceEditor().getTextViewer(), 615);
-
- dependencySet=new HashSet();
-
- VpeTemplate spanTemplate =
templateManager.getTemplate(vpeController.getPageContext(),span, dependencySet);
-
- assertNotNull(spanTemplate);
- assertEquals(10,spanTemplate.getTextFormatingData().getAllFormatData().length);
- }
-
-
-}
Copied:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1494Test.java
(from rev 8646,
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1494.java)
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1494Test.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1494Test.java 2008-06-09
19:08:56 UTC (rev 8651)
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.jsf.test.jbide;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
+import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.vpe.editor.VpeController;
+import org.jboss.tools.vpe.editor.template.VpeTemplate;
+import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+import org.w3c.dom.Node;
+
+/**
+ * @author mareshkau
+ *
+ */
+public class JBIDE1494Test extends VpeTest{
+
+ public static final String IMPORT_PROJECT_NAME = "jsfTest"; //$NON-NLS-1$
+
+ private static final String TEST_PAGE_NAME = "JBIDE/1494/JBIDE-1494.xhtml";
//$NON-NLS-1$
+
+ public JBIDE1494Test(String name) {
+ super(name);
+ }
+
+ public void testJBIDE1494() throws Throwable {
+ // wait
+ TestUtil.waitForJobs();
+ // set exception
+ setException(null);
+ // Tests CA
+ // get test page path
+ IFile file = (IFile) TestUtil.getComponentPath(TEST_PAGE_NAME,
+ IMPORT_PROJECT_NAME);
+ assertNotNull("Could not open specified file " + TEST_PAGE_NAME, file);
//$NON-NLS-1$
+
+ IEditorInput input = new FileEditorInput(file);
+
+ assertNotNull("Editor input is null", input); //$NON-NLS-1$
+
+ // open and get editor
+ JSPMultiPageEditor part = openEditor(input);
+
+ StyledText styledText = part.getSourceEditor().getTextViewer()
+ .getTextWidget();
+
+ styledText.setCaretOffset(424);
+ Node h_outputText = (Node) ContentAssistUtils.getNodeAt(part
+ .getSourceEditor().getTextViewer(), 424);
+
+ assertNotNull(h_outputText);
+
+ VpeController vpeController = getVpeController(part);
+
+ VpeTemplateManager templateManager=
vpeController.getPageContext().getVisualBuilder().getTemplateManager();
+ assertNotNull(templateManager);
+ Set<?> dependencySet = new HashSet();
+ VpeTemplate h_output_template =
templateManager.getTemplate(vpeController.getPageContext(),h_outputText, dependencySet);
+
+ assertNotNull(h_output_template.getTextFormatingData());
+ //text formating for h:output
+ assertEquals(7,h_output_template.getTextFormatingData().getAllFormatData().length);
+
+ Node h_dataTable = (Node) ContentAssistUtils.getNodeAt(part
+ .getSourceEditor().getTextViewer(), 473);
+
+ assertNotNull(h_dataTable);
+
+ dependencySet=new HashSet();
+
+ VpeTemplate h_data_Table =
templateManager.getTemplate(vpeController.getPageContext(),h_dataTable , dependencySet);
+
+ assertNotNull(h_data_Table.getTextFormatingData());
+
+ assertEquals(8,h_data_Table.getTextFormatingData().getAllFormatData().length);
+
+ Node span =(Node) ContentAssistUtils.getNodeAt(part
+ .getSourceEditor().getTextViewer(), 615);
+
+ dependencySet=new HashSet();
+
+ VpeTemplate spanTemplate =
templateManager.getTemplate(vpeController.getPageContext(),span, dependencySet);
+
+ assertNotNull(spanTemplate);
+ assertEquals(10,spanTemplate.getTextFormatingData().getAllFormatData().length);
+ }
+
+
+}
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2297Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2297Test.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2297Test.java 2008-06-09
19:08:56 UTC (rev 8651)
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jsf.vpe.jsf.test.jbide;
+
+import org.eclipse.core.resources.IFile;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+
+/**
+ * Test case for
+ *
+ * @author mareshkau
+ *
+ */
+public class JBIDE2297Test extends VpeTest{
+
+ public static final String IMPORT_PROJECT_NAME = "jsfTest"; //$NON-NLS-1$
+
+ private static final String TEST_PAGE_NAME = "JBIDE/2297/JBIDE-2297.xhtml";
//$NON-NLS-1$
+
+ public JBIDE2297Test(String name) {
+ super(name);
+ }
+
+ public void testJBIDE2297() throws Throwable {
+ performTestForVpeComponent((IFile)
TestUtil.getComponentPath(TEST_PAGE_NAME,IMPORT_PROJECT_NAME));
+ }
+}