Author: scabanovich
Date: 2012-01-30 20:16:19 -0500 (Mon, 30 Jan 2012)
New Revision: 38310
Added:
trunk/jst/tests/org.jboss.tools.jst.web.test/src/org/jboss/tools/jst/web/test/WebMetaModelTest.java
Modified:
trunk/jst/tests/org.jboss.tools.jst.web.test/META-INF/MANIFEST.MF
trunk/jst/tests/org.jboss.tools.jst.web.test/src/org/jboss/tools/jst/web/test/JstWebAllTests.java
Log:
JBIDE-10448
https://issues.jboss.org/browse/JBIDE-10448
Tests are added.
Modified: trunk/jst/tests/org.jboss.tools.jst.web.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.test/META-INF/MANIFEST.MF 2012-01-31 01:09:07
UTC (rev 38309)
+++ trunk/jst/tests/org.jboss.tools.jst.web.test/META-INF/MANIFEST.MF 2012-01-31 01:16:19
UTC (rev 38310)
@@ -8,6 +8,7 @@
org.eclipse.core.runtime,
org.eclipse.core.resources,
org.jboss.tools.common.el.core,
+ org.jboss.tools.common.model.test,
org.jboss.tools.jst.web.kb,
org.jboss.tools.common.validation,
org.junit,
Modified:
trunk/jst/tests/org.jboss.tools.jst.web.test/src/org/jboss/tools/jst/web/test/JstWebAllTests.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.jst.web.test/src/org/jboss/tools/jst/web/test/JstWebAllTests.java 2012-01-31
01:09:07 UTC (rev 38309)
+++
trunk/jst/tests/org.jboss.tools.jst.web.test/src/org/jboss/tools/jst/web/test/JstWebAllTests.java 2012-01-31
01:16:19 UTC (rev 38310)
@@ -22,6 +22,7 @@
public static Test suite() {
TestSuite suite = new TestSuite(JstWebAllTests.class.getName());
+ suite.addTestSuite(WebMetaModelTest.class);
suite.addTestSuite(WebContentAssistProviderTest.class);
// suite.addTestSuite(BuilderTest.class);
suite.addTest(new WebValidationTestSetup(new TestSuite(
Added:
trunk/jst/tests/org.jboss.tools.jst.web.test/src/org/jboss/tools/jst/web/test/WebMetaModelTest.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.jst.web.test/src/org/jboss/tools/jst/web/test/WebMetaModelTest.java
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.jst.web.test/src/org/jboss/tools/jst/web/test/WebMetaModelTest.java 2012-01-31
01:16:19 UTC (rev 38310)
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2012 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.jst.web.test;
+
+import java.util.Set;
+
+import org.jboss.tools.common.meta.XModelEntity;
+import org.jboss.tools.common.meta.action.XActionItem;
+import org.jboss.tools.common.model.test.MetaModelTest;
+
+/**
+ * This test runs tests defined in MetaModelTest in context of jst module.
+ * MetaModelTest is defined in common module, but to check consistency of
+ * the meta model of a concrete context, the test should be run in it.
+ *
+ * Some actions used by Web Projects view do not comply the rule that
+ * requires action handler and icon to be packaged in the same module,
+ * but the view is considers them as extensions that may be non-available.
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class WebMetaModelTest extends MetaModelTest {
+
+ protected void collectActionsWithWrongHandlers(XModelEntity entity, XActionItem item,
Set<String> errors) {
+ if(!entity.getName().equals("WebWorkspace") &&
+ !entity.getName().equals("WebPrjAddModuleHelper") &&
+ (!entity.getName().equals("FileSystems") ||
!item.getName().equals("SynchronizeModules"))
+ ) {
+ super.collectActionsWithWrongHandlers(entity, item, errors);
+ }
+ }
+
+ protected void collectActionsWithoutIcon(XModelEntity entity, XActionItem item,
Set<String> actionsWithoutIcons) {
+ if(!entity.getName().equals("WebWorkspace")) {
+ super.collectActionsWithoutIcon(entity, item, actionsWithoutIcons);
+ }
+ }
+}
Property changes on:
trunk/jst/tests/org.jboss.tools.jst.web.test/src/org/jboss/tools/jst/web/test/WebMetaModelTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain