Author: vrubezhny
Date: 2011-08-03 18:45:10 -0400 (Wed, 03 Aug 2011)
New Revision: 33566
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/jsp/ca/test/JsfJspLongResourceBundlePropertyNamesTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java
Log:
JBIDE-9414
CA incorrectly inserts a long-named properties from resource bundles
JUnit test is added
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/jsp/ca/test/JsfJspLongResourceBundlePropertyNamesTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/jsp/ca/test/JsfJspLongResourceBundlePropertyNamesTest.java 2011-08-03
22:11:59 UTC (rev 33565)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/jsp/ca/test/JsfJspLongResourceBundlePropertyNamesTest.java 2011-08-03
22:45:10 UTC (rev 33566)
@@ -15,14 +15,14 @@
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.jboss.tools.common.base.test.contentassist.CATestUtil;
import org.jboss.tools.jst.jsp.contentassist.AutoContentAssistantProposal;
import org.jboss.tools.jst.jsp.test.ca.ContentAssistantTestCase;
-import org.jboss.tools.jst.jsp.test.ca.JstJspJbide1641Test;
import org.jboss.tools.test.util.JobUtils;
-import org.jboss.tools.test.util.TestProjectProvider;
+import org.jboss.tools.test.util.ProjectImportTestSetup;
/**
* The JUnit test cases for
https://issues.jboss.org/browse/JBIDE-9414 issue
@@ -31,8 +31,6 @@
*
*/
public class JsfJspLongResourceBundlePropertyNamesTest extends ContentAssistantTestCase
{
- TestProjectProvider provider = null;
- boolean makeCopy = false;
private static final String PROJECT_NAME = "CAForCompositeComponentTest";
private static final String PAGE_NAME =
"WebContent/pages/greetingLong.xhtml";
private static final String PROPOSAL_TO_APPLY_STRING =
"['org.jboss.long.named.Property']";
@@ -41,39 +39,18 @@
private static final String TEXT_PREFIX_STRING = "<ui:define
name=\"body\"";
private static final String COMPARE_STRING =
"#{msg['org.jboss.long.named.Property']";
-// public JsfJspLongResourceBundlePropertyNamesTest() {
-// try {
-// provider = new TestProjectProvider("org.jboss.tools.jsf.ui.test", null,
PROJECT_NAME, makeCopy);
-// project = provider.getProject();
-// } catch (CoreException e) {
-// e.printStackTrace();
-// project = null;
-// }
-// }
-
public void setUp() throws Exception {
- provider = new TestProjectProvider("org.jboss.tools.jsf.ui.test", null,
PROJECT_NAME, makeCopy);
- project = provider.getProject();
+ project = ProjectImportTestSetup.loadProject(PROJECT_NAME);
+ project.build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
}
protected void tearDown() throws Exception {
- if(provider != null) {
- provider.dispose();
- }
}
public static Test suite() {
- return new TestSuite(JstJspJbide1641Test.class);
+ return new TestSuite(JsfJspLongResourceBundlePropertyNamesTest.class);
}
-// @Override
-// protected void finalize() throws Throwable {
-// if(provider != null) {
-// provider.dispose();
-// }
-// super.finalize();
-// }
-
private void doTestLongResourceBundlePropertyNames(String tagName, String prefix, String
proposalToApply, String compareString) {
// Find start of <ui:composition> tag
String documentContent = document.get();
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java 2011-08-03
22:11:59 UTC (rev 33565)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java 2011-08-03
22:45:10 UTC (rev 33566)
@@ -61,9 +61,15 @@
suite.addTestSuite(JsfJspJbide1704Test.class);
suite.addTestSuite(JsfJspJbide1717Test.class);
suite.addTestSuite(JsfJBide3845Test.class);
- suite.addTestSuite(JsfJspLongResourceBundlePropertyNamesTest.class);
+// suite.addTestSuite(JsfJspLongResourceBundlePropertyNamesTest.class);
+
suite.addTest(
+ new ProjectImportTestSetup(JsfJspLongResourceBundlePropertyNamesTest.suite(),
+ "org.jboss.tools.jsf.ui.test",
+ new String[] { "projects/CAForCompositeComponentTest", }, //$NON-NLS-1$
+ new String[] { "CAForCompositeComponentTest" })); //$NON-NLS-1$
+ suite.addTest(
new ProjectImportTestSetup(WebContentAssistProviderTest.suite(),
"org.jboss.tools.jsf.ui.test",
new String[] { "projects/TestsWebArtefacts", }, //$NON-NLS-1$