[jbosstools-commits] JBoss Tools SVN: r21960 - in trunk/esb/tests/org.jboss.tools.esb.core.test: src/org/jboss/tools/esb/core/test and 1 other directory.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Fri May 7 12:26:54 EDT 2010


Author: scabanovich
Date: 2010-05-07 12:26:53 -0400 (Fri, 07 May 2010)
New Revision: 21960

Modified:
   trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.2/jboss-esb-notifiers.xml
   trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBModelTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6164

Modified: trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.2/jboss-esb-notifiers.xml
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.2/jboss-esb-notifiers.xml	2010-05-07 15:59:20 UTC (rev 21959)
+++ trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.2/jboss-esb-notifiers.xml	2010-05-07 16:26:53 UTC (rev 21960)
@@ -21,6 +21,12 @@
        <target class="NotifyQueues">
         <queue jndiName="queue/MincomJMS_reply"/>
        </target>
+       <target auth="true" ccTo="person at somewhereelse.com"
+        class="NotifyEmail" from="person at somewhere.com" host="localhost"
+        msgAttachmentName="attachment" password="smtpPassword"
+        port="8801" sendTo="person at elsewhere.com" subject="theSubject" username="smtpUsername">
+        <attachment>attachThisFile.txt</attachment>
+       </target>
       </NotificationList>
      </property>
     </action>

Modified: trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBModelTest.java
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBModelTest.java	2010-05-07 15:59:20 UTC (rev 21959)
+++ trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBModelTest.java	2010-05-07 16:26:53 UTC (rev 21960)
@@ -273,6 +273,36 @@
 		assertTrue(errorList.toString(), errorList.length() == 0);
 	}
 
+	public void testNotifyEmail() {
+		XModelObject object = getFileObject("esb-1.2", "jboss-esb-notifiers.xml", ESBConstants.ENT_ESB_FILE_120);
+		
+		StringBuffer errorList = new StringBuffer();
+		
+		String notifyEmailPath = "Services/s/Actions/SendResponseNotifier/ok/NotifyEmail";
+		
+		String[][] notifyEmailAttrValues = {
+			{"from", "person at somewhere.com"},
+			{"send to", "person at elsewhere.com"},
+			{"subject", "theSubject"},
+			{"host", "localhost"},
+			{"port", "8801"},
+			{"username", "smtpUsername"},
+			{"password", "smtpPassword"},
+			{"auth", "true"},
+			{"copy to", "person at somewhereelse.com"},
+			{"attachment name", "attachment"},
+		};
+		checkAttributes(object, notifyEmailPath, notifyEmailAttrValues, errorList);
+
+		String attachmentPath = notifyEmailPath + "/attachThisFile.txt";
+		String[][] attachmentAttrValues = {
+				{"file", "attachThisFile.txt"},
+		};
+		checkAttributes(object, attachmentPath, attachmentAttrValues, errorList);
+
+		assertTrue(errorList.toString(), errorList.length() == 0);
+	}
+
 	XModelObject getFileObject(String parentPath, String xmlname) {
 		return getFileObject(parentPath, xmlname, ESBConstants.ENT_ESB_FILE_101);
 	}



More information about the jbosstools-commits mailing list