01: package test;
02:
03: import dalma.test.WorkflowTestProgram;
04: import junit.textui.TestRunner;
05:
06: /**
07: * Makes sure that endpoint name collisions are detected.
08: * @author Kohsuke Kawaguchi
09: */
10: public class EndPointNameCollisionTest extends WorkflowTestProgram {
11:
12: public EndPointNameCollisionTest(String name) {
13: super (name);
14: }
15:
16: public static void main(String[] args) throws Exception {
17: TestRunner.run(EndPointNameCollisionTest.class);
18: }
19:
20: protected void setupEndPoints() throws Exception {
21: engine.addEndPoint("email", getProperty("email.endpoint1"));
22: try {
23: engine.addEndPoint("email", getProperty("email.endpoint2"));
24: fail();
25: } catch (IllegalArgumentException e) {
26: assertTrue(e.getMessage().contains("email"));
27: }
28: }
29:
30: public void test() throws Throwable {
31: }
32: }
|