Author: akazakov
Date: 2009-12-30 14:31:52 -0500 (Wed, 30 Dec 2009)
New Revision: 19626
Added:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CATest.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java
Removed:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5383
Copied: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test (from
rev 17565, trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/core/test)
Copied:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CATest.java
(from rev 19624,
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/core/test/CATest.java)
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CATest.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CATest.java 2009-12-30
19:31:52 UTC (rev 19626)
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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.cdi.ui.test;
+
+import java.io.File;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.jboss.tools.cdi.core.test.tck.TCKTest;
+import org.jboss.tools.common.util.FileUtil;
+import org.jboss.tools.jst.jsp.test.ca.ContentAssistantTestCase;
+import org.jboss.tools.test.util.JobUtils;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class CATest extends TCKTest {
+
+ private IProject project;
+ private ContentAssistantTestCase caTest = new ContentAssistantTestCase();
+ private static final String PAGE_NAME = "WebContent/test.jsp";
+ private static final String RESOURCE_NAME = "/resources/CATest/test.jsp";
+ private String[] beanProposals = new String[] {"example",
"example.com", "fish", "game", "haddock",
"salmon", "sheep", "tunaFarm", "whitefish",
"wolf"};
+ private String[] propertyProposals = new String[] {"game.value",
"game.initialize"};
+ private final static String UI_TEST_PLUGIN_ID =
"org.jboss.tools.cdi.ui.test";
+
+ public CATest() {
+ super();
+ try {
+ project = importPreparedProject("/lookup");
+ Bundle ui = Platform.getBundle(UI_TEST_PLUGIN_ID);
+ String projectPath = project.getLocation().toString();
+ String resourcePath = FileLocator.resolve(ui.getEntry(RESOURCE_NAME)).getFile();
+
+ File from = new File(resourcePath);
+ File to = new File(projectPath, PAGE_NAME);
+
+ FileUtil.copyFile(from, to);
+ caTest.setProject(project);
+ project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+ JobUtils.waitForIdle(2000);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void testEL() {
+ JobUtils.waitForIdle(2000);
+ caTest.checkProposals(PAGE_NAME, "value=\"#{", 9, beanProposals,
false);
+ caTest.checkProposals(PAGE_NAME, "rendered=\"#{(game.", 18,
propertyProposals, false);
+ }
+}
\ No newline at end of file
Deleted:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/core/test/CDIUIAllTests.java 2009-09-14
19:58:51 UTC (rev 17565)
+++
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java 2009-12-30
19:31:52 UTC (rev 19626)
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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.cdi.core.test;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-/**
- * @author Alexey Kazakov
- */
-public class CDIUIAllTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite("CDI UI Tests");
- return suite;
- }
-}
\ No newline at end of file
Copied:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java
(from rev 19623,
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/core/test/CDIUIAllTests.java)
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java 2009-12-30
19:31:52 UTC (rev 19626)
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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.cdi.ui.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class CDIUIAllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("CDI UI Tests");
+ suite.addTestSuite(CATest.class);
+ return suite;
+ }
+}
\ No newline at end of file