Author: scabanovich
Date: 2010-11-26 10:50:45 -0500 (Fri, 26 Nov 2010)
New Revision: 26984
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFPaletteTest.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java
Log:
JBIDE-7561
https://jira.jboss.org/browse/JBIDE-7561
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFPaletteTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFPaletteTest.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFPaletteTest.java 2010-11-26
15:50:45 UTC (rev 26984)
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.test;
+
+import org.jboss.tools.common.model.XModel;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.options.PreferenceModelUtilities;
+
+import junit.framework.TestCase;
+
+public class JSFPaletteTest extends TestCase {
+
+ public void testJSFPalette() {
+ XModel model = PreferenceModelUtilities.getPreferenceModel();
+ assertNotNull("Cannot find preference model.", model);
+
+ XModelObject palette = model.getRoot("Palette");
+ assertNotNull("Cannot find Palette model object.", palette);
+
+ XModelObject jsfTab = palette.getChildByPath("JSF");
+ assertNotNull("Cannot find JSF Palette model object.", jsfTab);
+
+ XModelObject htmlGroup = jsfTab.getChildByPath("HTML");
+ assertNotNull("Cannot find JSF HTML Group model object.", htmlGroup);
+ String htmlGroupHiffen = htmlGroup.getAttributeValue("hidden");
+ assertEquals("JSF HTML Group should not be hidden", "no",
htmlGroupHiffen);
+
+ XModelObject coreGroup = jsfTab.getChildByPath("Core");
+ assertNotNull("Cannot find JSF Core Group model object.", coreGroup);
+ String coreGroupHiffen = coreGroup.getAttributeValue("hidden");
+ assertEquals("JSF Core Group should be hidden", "yes",
coreGroupHiffen);
+ }
+
+}
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFPaletteTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java 2010-11-26
15:47:00 UTC (rev 26983)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java 2010-11-26
15:50:45 UTC (rev 26984)
@@ -41,6 +41,7 @@
old.addTestSuite(JSFModelTest.class);
old.addTestSuite(ModelFormat_2_0_0_Test.class);
old.addTestSuite(JSFBeansTest.class);
+ suite.addTestSuite(JSFPaletteTest.class);
suite.addTest(new ProjectImportTestSetup(old,
"org.jboss.tools.jsf.test", "projects/JSFKickStartOldFormat",
//$NON-NLS-1$ //$NON-NLS-2$
"JSFKickStartOldFormat")); //$NON-NLS-1$