Author: scabanovich
Date: 2012-01-30 19:06:27 -0500 (Mon, 30 Jan 2012)
New Revision: 38305
Modified:
trunk/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/MetaModelTest.java
Log:
JBIDE-10448
https://issues.jboss.org/browse/JBIDE-10448
Tests are added.
Modified:
trunk/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/MetaModelTest.java
===================================================================
---
trunk/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/MetaModelTest.java 2012-01-30
23:15:51 UTC (rev 38304)
+++
trunk/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/MetaModelTest.java 2012-01-31
00:06:27 UTC (rev 38305)
@@ -29,6 +29,7 @@
import org.jboss.tools.common.meta.impl.XModelMetaDataImpl;
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelException;
+import org.jboss.tools.common.model.XModelFactory;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.engines.impl.EnginesLoader;
import org.jboss.tools.common.model.event.XModelTreeEvent;
@@ -162,7 +163,7 @@
assertTrue(sb.toString(), errors.size() == 0);
}
- void collectActionsWithWrongHandlers(XModelEntity entity, XActionItem item,
Set<String> errors) {
+ protected void collectActionsWithWrongHandlers(XModelEntity entity, XActionItem item,
Set<String> errors) {
if(item instanceof XActionList) {
XActionList list = (XActionList)item;
XActionItem[] is = list.getActionItems();
@@ -245,7 +246,7 @@
assertTrue(message.toString(), actionsWithoutIcons.size() == 0);
}
- void collectActionsWithoutIcon(XModelEntity entity, XActionItem item, Set<String>
actionsWithoutIcons) {
+ protected void collectActionsWithoutIcon(XModelEntity entity, XActionItem item,
Set<String> actionsWithoutIcons) {
String iconPath = item.getIconKey();
if(iconPath != null && item.getPath() != null
&& iconPath.length() > 0
@@ -277,7 +278,7 @@
*/
public void testCreatingModelObjects() {
XModelMetaData meta = XModelMetaDataImpl.getInstance();
- XModel model = PreferenceModelUtilities.getPreferenceModel();
+ XModel model = XModelFactory.getDefaultInstance();
String[] entities = meta.entities();
StringBuilder sb = new StringBuilder();
int errors = 0;
@@ -306,7 +307,7 @@
* introduce attribute 'example' to entity.
*/
public void testObjectLoaders() {
- XModel model = PreferenceModelUtilities.getPreferenceModel();
+ XModel model = XModelFactory.getDefaultInstance();
XModelMetaData meta = XModelMetaDataImpl.getInstance();
String[] entities = meta.entities();
StringBuilder sb = new StringBuilder();