[overlord-commits] Overlord SVN: r120 - in cdl/trunk/tools/plugins/org.jboss.tools.overlord.jbossesb/src: test/org/jboss/tools/overlord/jbossesb/model/actions and 1 other directory.

overlord-commits at lists.jboss.org overlord-commits at lists.jboss.org
Fri Jul 4 09:36:08 EDT 2008


Author: objectiser
Date: 2008-07-04 09:36:08 -0400 (Fri, 04 Jul 2008)
New Revision: 120

Added:
   cdl/trunk/tools/plugins/org.jboss.tools.overlord.jbossesb/src/java/org/jboss/tools/overlord/jbossesb/model/actions/SetStateAction.java
   cdl/trunk/tools/plugins/org.jboss.tools.overlord.jbossesb/src/test/org/jboss/tools/overlord/jbossesb/model/actions/SetStateActionTest.java
Removed:
   cdl/trunk/tools/plugins/org.jboss.tools.overlord.jbossesb/src/java/org/jboss/tools/overlord/jbossesb/model/actions/SetVariableAction.java
   cdl/trunk/tools/plugins/org.jboss.tools.overlord.jbossesb/src/test/org/jboss/tools/overlord/jbossesb/model/actions/SetVariableActionTest.java
Modified:
   cdl/trunk/tools/plugins/org.jboss.tools.overlord.jbossesb/src/java/org/jboss/tools/overlord/jbossesb/model/actions/Messages.properties
Log:
Changed SetVariableAction to be SetStateAction, with different expressions depending upon whether the state was being set from information derived from the message or state.

Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.jbossesb/src/java/org/jboss/tools/overlord/jbossesb/model/actions/Messages.properties
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.jbossesb/src/java/org/jboss/tools/overlord/jbossesb/model/actions/Messages.properties	2008-07-04 11:58:37 UTC (rev 119)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.jbossesb/src/java/org/jboss/tools/overlord/jbossesb/model/actions/Messages.properties	2008-07-04 13:36:08 UTC (rev 120)
@@ -29,6 +29,7 @@
 _NOT_SPECIFIED_CONVERSATION_TYPE=Conversation type must be specified on root service descriptor
 _NOT_SPECIFIED_REQ_RESP_EPR=Send does not contain request service category/name or response client EPR
 _MUST_BE_FIRST_ACTION='{0}' action must be first in the service descriptor
+_MUST_SPECIFY_STATE_OR_MESSAGE_EXPRESSION=Must specify either a State OR Message based expression
 _PARALLEL_MORE_THAN_TWO_PATHS=Parallel action must specify two or more paths
 _PARALLEL_PATH_AFTER_JOIN=Parallel path must not be defined after a join
 _PATH_SERVICE_DETAILS_MISSING=One or more paths are missing the service cateogry and/or name

Copied: cdl/trunk/tools/plugins/org.jboss.tools.overlord.jbossesb/src/java/org/jboss/tools/overlord/jbossesb/model/actions/SetStateAction.java (from rev 110, cdl/trunk/tools/plugins/org.jboss.tools.overlord.jbossesb/src/java/org/jboss/tools/overlord/jbossesb/model/actions/SetVariableAction.java)
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.jbossesb/src/java/org/jboss/tools/overlord/jbossesb/model/actions/SetStateAction.java	                        (rev 0)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.jbossesb/src/java/org/jboss/tools/overlord/jbossesb/model/actions/SetStateAction.java	2008-07-04 13:36:08 UTC (rev 120)
@@ -0,0 +1,134 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ */
+package org.jboss.tools.overlord.jbossesb.model.actions;
+
+import java.util.logging.Logger;
+
+import org.jboss.tools.overlord.jbossesb.model.*;
+import org.scribble.model.*;
+
+/**
+ * The model component for the 'SetVariableAction'. 
+ *  
+ * @author gary
+ */
+public class SetStateAction extends AbstractESBAction {
+
+	public static final String STATE_EXPRESSION = "stateExpression";
+	public static final String MESSAGE_EXPRESSION = "messageExpression";
+	public static final String VARIABLE = "variable";
+
+	/**
+	 * The constructor for the action.
+	 * 
+	 * @param service The reference to the service in which
+	 * 				the action is contained
+	 * @param action The XML configuration details for the action
+	 */
+	public SetStateAction(ESBService service,
+					org.w3c.dom.Element action) {
+		super(service, action);
+	}
+
+	/**
+	 * This method returns the mandatory property names.
+	 * 
+	 * @return The mandatory property names
+	 */
+	@Override
+	protected String[] getMandatoryProperties() {
+		return(new String[]{VARIABLE});
+	}	
+
+	/**
+	 * This method validates the ESB action and reports warnings or
+	 * errors to the supplied model listener.
+	 * 
+	 * @param l The model listener
+	 */
+	@Override
+	public void validate(ModelListener l) {
+		super.validate(l);
+		
+		String variable=getPropertyValue(VARIABLE);
+		
+		if (variable != null) {
+			
+			// Check that variable defined on session class
+			Class<?> cls=getService().getSessionClass();
+			
+			if (cls != null) {
+				try {
+					java.beans.BeanInfo bi=java.beans.Introspector.getBeanInfo(cls);
+					
+					boolean f_found=false;
+					
+					java.beans.PropertyDescriptor[] pds=bi.getPropertyDescriptors();
+					
+					for (int i=0; f_found==false && pds != null &&
+								i < pds.length; i++) {
+						if (pds[i].getName().equals(variable)) {
+							f_found = true;
+						}
+					}
+					
+					if (f_found == false) {
+						l.error(this, org.scribble.util.MessageUtil.format(
+								java.util.PropertyResourceBundle.getBundle(
+								"org.jboss.tools.overlord.jbossesb.model.actions.Messages"),
+									"_NOT_FOUND_VARIABLE",
+									new String[]{variable, cls.getName()}), null);					
+					}
+				} catch(Exception e) {
+					logger.log(java.util.logging.Level.SEVERE,
+							"Failed to check if variable '"+
+							variable+"' exists on session class '"+
+							cls+"'", e);
+				}
+			}
+		}
+		
+		// Check that state or message expression defined
+		String stateExpression=getPropertyValue(STATE_EXPRESSION);
+		String messageExpression=getPropertyValue(MESSAGE_EXPRESSION);
+		
+		if ((stateExpression == null && messageExpression == null) ||
+				(stateExpression != null && messageExpression != null)) {
+			l.error(this, org.scribble.util.MessageUtil.format(
+					java.util.PropertyResourceBundle.getBundle(
+					"org.jboss.tools.overlord.jbossesb.model.actions.Messages"),
+						"_MUST_SPECIFY_STATE_OR_MESSAGE_EXPRESSION",
+						new String[]{}), null);					
+		}
+	}
+		
+	/**
+	 * This method converts the ESB action into an equivalent
+	 * behavioural description for conformance checking.
+	 * 
+	 * @param activities The list of activities that will contain
+	 * 				the converted action(s)
+	 * @param context The conversion context
+	 */
+	@Override
+	public void convert(java.util.List<Activity> activities,
+			ConversionContext context) {
+	}
+	
+	private static Logger logger = Logger.getLogger("org.jboss.tools.overlord.jbossesb.model.actions");
+}

Deleted: cdl/trunk/tools/plugins/org.jboss.tools.overlord.jbossesb/src/java/org/jboss/tools/overlord/jbossesb/model/actions/SetVariableAction.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.jbossesb/src/java/org/jboss/tools/overlord/jbossesb/model/actions/SetVariableAction.java	2008-07-04 11:58:37 UTC (rev 119)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.jbossesb/src/java/org/jboss/tools/overlord/jbossesb/model/actions/SetVariableAction.java	2008-07-04 13:36:08 UTC (rev 120)
@@ -1,119 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- */
-package org.jboss.tools.overlord.jbossesb.model.actions;
-
-import java.util.logging.Logger;
-
-import org.jboss.tools.overlord.jbossesb.model.*;
-import org.scribble.model.*;
-
-/**
- * The model component for the 'SetVariableAction'. 
- *  
- * @author gary
- */
-public class SetVariableAction extends AbstractESBAction {
-
-	private static final String VARIABLE = "variable";
-
-	/**
-	 * The constructor for the action.
-	 * 
-	 * @param service The reference to the service in which
-	 * 				the action is contained
-	 * @param action The XML configuration details for the action
-	 */
-	public SetVariableAction(ESBService service,
-					org.w3c.dom.Element action) {
-		super(service, action);
-	}
-
-	/**
-	 * This method returns the mandatory property names.
-	 * 
-	 * @return The mandatory property names
-	 */
-	@Override
-	protected String[] getMandatoryProperties() {
-		return(new String[]{VARIABLE});
-	}	
-
-	/**
-	 * This method validates the ESB action and reports warnings or
-	 * errors to the supplied model listener.
-	 * 
-	 * @param l The model listener
-	 */
-	@Override
-	public void validate(ModelListener l) {
-		super.validate(l);
-		
-		String variable=getPropertyValue(VARIABLE);
-		
-		if (variable != null) {
-			
-			// Check that variable defined on session class
-			Class<?> cls=getService().getSessionClass();
-			
-			if (cls != null) {
-				try {
-					java.beans.BeanInfo bi=java.beans.Introspector.getBeanInfo(cls);
-					
-					boolean f_found=false;
-					
-					java.beans.PropertyDescriptor[] pds=bi.getPropertyDescriptors();
-					
-					for (int i=0; f_found==false && pds != null &&
-								i < pds.length; i++) {
-						if (pds[i].getName().equals(variable)) {
-							f_found = true;
-						}
-					}
-					
-					if (f_found == false) {
-						l.error(this, org.scribble.util.MessageUtil.format(
-								java.util.PropertyResourceBundle.getBundle(
-								"org.jboss.tools.overlord.jbossesb.model.actions.Messages"),
-									"_NOT_FOUND_VARIABLE",
-									new String[]{variable, cls.getName()}), null);					
-					}
-				} catch(Exception e) {
-					logger.log(java.util.logging.Level.SEVERE,
-							"Failed to check if variable '"+
-							variable+"' exists on session class '"+
-							cls+"'", e);
-				}
-			}
-		}
-	}
-		
-	/**
-	 * This method converts the ESB action into an equivalent
-	 * behavioural description for conformance checking.
-	 * 
-	 * @param activities The list of activities that will contain
-	 * 				the converted action(s)
-	 * @param context The conversion context
-	 */
-	@Override
-	public void convert(java.util.List<Activity> activities,
-			ConversionContext context) {
-	}
-	
-	private static Logger logger = Logger.getLogger("org.jboss.tools.overlord.jbossesb.model.actions");
-}

Copied: cdl/trunk/tools/plugins/org.jboss.tools.overlord.jbossesb/src/test/org/jboss/tools/overlord/jbossesb/model/actions/SetStateActionTest.java (from rev 110, cdl/trunk/tools/plugins/org.jboss.tools.overlord.jbossesb/src/test/org/jboss/tools/overlord/jbossesb/model/actions/SetVariableActionTest.java)
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.jbossesb/src/test/org/jboss/tools/overlord/jbossesb/model/actions/SetStateActionTest.java	                        (rev 0)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.jbossesb/src/test/org/jboss/tools/overlord/jbossesb/model/actions/SetStateActionTest.java	2008-07-04 13:36:08 UTC (rev 120)
@@ -0,0 +1,209 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ */
+package org.jboss.tools.overlord.jbossesb.model.actions;
+
+import junit.framework.TestCase;
+
+public class SetStateActionTest extends TestCase {
+
+	public void testValidateNoVariable() {
+		TestESBService service=new TestESBService();
+		service.setRoot(true);
+
+		java.util.Map<String,String> props=new java.util.Hashtable<String,String>();
+		props.put(SetStateAction.STATE_EXPRESSION, "");
+		
+		org.w3c.dom.Element elem=ESBActionTestUtil.getAction(null, props, null);
+		
+		SetStateAction action=new SetStateAction(service, elem);
+		
+		service.getActions().add(action);
+		
+		TestModelListener l=new TestModelListener();
+		
+		l.addExpectedError(org.scribble.util.MessageUtil.format(
+				java.util.PropertyResourceBundle.getBundle(
+				"org.jboss.tools.overlord.jbossesb.model.Messages"),
+					"_NOT_SPECIFIED_PROPERTY",
+					new String[]{"variable"}));
+		
+		action.validate(l);
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+	
+	public void testValidateVariableNotClassProperty() {
+		String varName="classX";
+		Class<?> cls=java.lang.Object.class;
+		
+		TestESBService service=new TestESBService();
+		service.setRoot(true);
+		service.setSessionClass(cls);
+
+		java.util.Map<String,String> props=new java.util.Hashtable<String,String>();
+		props.put(SetStateAction.VARIABLE, varName);
+		props.put(SetStateAction.STATE_EXPRESSION, "");
+		
+		org.w3c.dom.Element elem=ESBActionTestUtil.getAction(null,
+							props, null);
+		
+		SetStateAction action=new SetStateAction(service, elem);
+		
+		service.getActions().add(action);
+		
+		TestModelListener l=new TestModelListener();
+		
+		l.addExpectedError(org.scribble.util.MessageUtil.format(
+				java.util.PropertyResourceBundle.getBundle(
+						"org.jboss.tools.overlord.jbossesb.model.actions.Messages"),
+							"_NOT_FOUND_VARIABLE",
+							new String[]{varName, cls.getName()}));
+		
+		action.validate(l);
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+
+	public void testValidateVariableIsClassProperty() {
+		String varName="class";
+		Class<?> cls=java.lang.Object.class;
+		
+		TestESBService service=new TestESBService();
+		service.setRoot(true);
+		service.setSessionClass(cls);
+
+		java.util.Map<String,String> props=new java.util.Hashtable<String,String>();
+		props.put(SetStateAction.VARIABLE, varName);
+		props.put(SetStateAction.STATE_EXPRESSION, "");
+		
+		org.w3c.dom.Element elem=ESBActionTestUtil.getAction(null,
+							props, null);
+		
+		SetStateAction action=new SetStateAction(service, elem);
+		
+		service.getActions().add(action);
+		
+		TestModelListener l=new TestModelListener();
+		
+		action.validate(l);
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+
+	public void testValidateMissingExpression() {
+		String varName="class";
+		Class<?> cls=java.lang.Object.class;
+		
+		TestESBService service=new TestESBService();
+		service.setRoot(true);
+		service.setSessionClass(cls);
+
+		java.util.Map<String,String> props=new java.util.Hashtable<String,String>();
+		props.put(SetStateAction.VARIABLE, varName);
+		
+		org.w3c.dom.Element elem=ESBActionTestUtil.getAction(null,
+							props, null);
+		
+		SetStateAction action=new SetStateAction(service, elem);
+		
+		service.getActions().add(action);
+		
+		TestModelListener l=new TestModelListener();
+		
+		l.addExpectedError(org.scribble.util.MessageUtil.format(
+				java.util.PropertyResourceBundle.getBundle(
+						"org.jboss.tools.overlord.jbossesb.model.actions.Messages"),
+							"_MUST_SPECIFY_STATE_OR_MESSAGE_EXPRESSION",
+							new String[]{}));
+
+		action.validate(l);
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+	
+	public void testValidateBothExpressions() {
+		String varName="class";
+		Class<?> cls=java.lang.Object.class;
+		
+		TestESBService service=new TestESBService();
+		service.setRoot(true);
+		service.setSessionClass(cls);
+
+		java.util.Map<String,String> props=new java.util.Hashtable<String,String>();
+		props.put(SetStateAction.VARIABLE, varName);
+		props.put(SetStateAction.MESSAGE_EXPRESSION, "mesg");
+		props.put(SetStateAction.STATE_EXPRESSION, "state");
+		
+		org.w3c.dom.Element elem=ESBActionTestUtil.getAction(null,
+							props, null);
+		
+		SetStateAction action=new SetStateAction(service, elem);
+		
+		service.getActions().add(action);
+		
+		TestModelListener l=new TestModelListener();
+		
+		l.addExpectedError(org.scribble.util.MessageUtil.format(
+				java.util.PropertyResourceBundle.getBundle(
+						"org.jboss.tools.overlord.jbossesb.model.actions.Messages"),
+							"_MUST_SPECIFY_STATE_OR_MESSAGE_EXPRESSION",
+							new String[]{}));
+
+		action.validate(l);
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+	
+	public void testValidateMessageExpression() {
+		String varName="class";
+		Class<?> cls=java.lang.Object.class;
+		
+		TestESBService service=new TestESBService();
+		service.setRoot(true);
+		service.setSessionClass(cls);
+
+		java.util.Map<String,String> props=new java.util.Hashtable<String,String>();
+		props.put(SetStateAction.VARIABLE, varName);
+		props.put(SetStateAction.MESSAGE_EXPRESSION, "mesg");
+		
+		org.w3c.dom.Element elem=ESBActionTestUtil.getAction(null,
+							props, null);
+		
+		SetStateAction action=new SetStateAction(service, elem);
+		
+		service.getActions().add(action);
+		
+		TestModelListener l=new TestModelListener();
+		
+		action.validate(l);
+		
+		if (l.isValid() == false) {
+			fail(l.invalidMessage());
+		}
+	}
+}

Deleted: cdl/trunk/tools/plugins/org.jboss.tools.overlord.jbossesb/src/test/org/jboss/tools/overlord/jbossesb/model/actions/SetVariableActionTest.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.jbossesb/src/test/org/jboss/tools/overlord/jbossesb/model/actions/SetVariableActionTest.java	2008-07-04 11:58:37 UTC (rev 119)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.jbossesb/src/test/org/jboss/tools/overlord/jbossesb/model/actions/SetVariableActionTest.java	2008-07-04 13:36:08 UTC (rev 120)
@@ -1,110 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- */
-package org.jboss.tools.overlord.jbossesb.model.actions;
-
-import junit.framework.TestCase;
-
-public class SetVariableActionTest extends TestCase {
-
-	public void testValidateNoVariable() {
-		TestESBService service=new TestESBService();
-		service.setRoot(true);
-
-		java.util.Map<String,String> props=new java.util.Hashtable<String,String>();
-		
-		org.w3c.dom.Element elem=ESBActionTestUtil.getAction(null, props, null);
-		
-		SetVariableAction action=new SetVariableAction(service, elem);
-		
-		service.getActions().add(action);
-		
-		TestModelListener l=new TestModelListener();
-		
-		l.addExpectedError(org.scribble.util.MessageUtil.format(
-				java.util.PropertyResourceBundle.getBundle(
-				"org.jboss.tools.overlord.jbossesb.model.Messages"),
-					"_NOT_SPECIFIED_PROPERTY",
-					new String[]{"variable"}));
-		
-		action.validate(l);
-		
-		if (l.isValid() == false) {
-			fail(l.invalidMessage());
-		}
-	}
-	
-	public void testValidateVariableNotClassProperty() {
-		String varName="classX";
-		Class<?> cls=java.lang.Object.class;
-		
-		TestESBService service=new TestESBService();
-		service.setRoot(true);
-		service.setSessionClass(cls);
-
-		java.util.Map<String,String> props=new java.util.Hashtable<String,String>();
-		props.put("variable", varName);
-		
-		org.w3c.dom.Element elem=ESBActionTestUtil.getAction(null,
-							props, null);
-		
-		SetVariableAction action=new SetVariableAction(service, elem);
-		
-		service.getActions().add(action);
-		
-		TestModelListener l=new TestModelListener();
-		
-		l.addExpectedError(org.scribble.util.MessageUtil.format(
-				java.util.PropertyResourceBundle.getBundle(
-						"org.jboss.tools.overlord.jbossesb.model.actions.Messages"),
-							"_NOT_FOUND_VARIABLE",
-							new String[]{varName, cls.getName()}));
-		
-		action.validate(l);
-		
-		if (l.isValid() == false) {
-			fail(l.invalidMessage());
-		}
-	}
-
-	public void testValidateVariableIsClassProperty() {
-		String varName="class";
-		Class<?> cls=java.lang.Object.class;
-		
-		TestESBService service=new TestESBService();
-		service.setRoot(true);
-		service.setSessionClass(cls);
-
-		java.util.Map<String,String> props=new java.util.Hashtable<String,String>();
-		props.put("variable", varName);
-		
-		org.w3c.dom.Element elem=ESBActionTestUtil.getAction(null,
-							props, null);
-		
-		SetVariableAction action=new SetVariableAction(service, elem);
-		
-		service.getActions().add(action);
-		
-		TestModelListener l=new TestModelListener();
-		
-		action.validate(l);
-		
-		if (l.isValid() == false) {
-			fail(l.invalidMessage());
-		}
-	}
-}




More information about the overlord-commits mailing list