Author: scabanovich
Date: 2010-05-07 11:54:55 -0400 (Fri, 07 May 2010)
New Revision: 21957
Modified:
branches/jbosstools-3.1.x/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.2/jboss-esb-notifiers.xml
branches/jbosstools-3.1.x/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:
branches/jbosstools-3.1.x/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.2/jboss-esb-notifiers.xml
===================================================================
---
branches/jbosstools-3.1.x/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.2/jboss-esb-notifiers.xml 2010-05-07
14:52:45 UTC (rev 21956)
+++
branches/jbosstools-3.1.x/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.2/jboss-esb-notifiers.xml 2010-05-07
15:54:55 UTC (rev 21957)
@@ -21,6 +21,12 @@
<target class="NotifyQueues">
<queue jndiName="queue/MincomJMS_reply"/>
</target>
+ <target auth="true" ccTo="person(a)somewhereelse.com"
+ class="NotifyEmail" from="person(a)somewhere.com"
host="localhost"
+ msgAttachmentName="attachment" password="smtpPassword"
+ port="8801" sendTo="person(a)elsewhere.com"
subject="theSubject" username="smtpUsername">
+ <attachment>attachThisFile.txt</attachment>
+ </target>
</NotificationList>
</property>
</action>
Modified:
branches/jbosstools-3.1.x/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBModelTest.java
===================================================================
---
branches/jbosstools-3.1.x/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBModelTest.java 2010-05-07
14:52:45 UTC (rev 21956)
+++
branches/jbosstools-3.1.x/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBModelTest.java 2010-05-07
15:54:55 UTC (rev 21957)
@@ -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(a)somewhere.com"},
+ {"send to", "person(a)elsewhere.com"},
+ {"subject", "theSubject"},
+ {"host", "localhost"},
+ {"port", "8801"},
+ {"username", "smtpUsername"},
+ {"password", "smtpPassword"},
+ {"auth", "true"},
+ {"copy to", "person(a)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);
}