Author: assaf
Date: Tue Oct 17 17:40:40 2006
New Revision: 465111

URL: http://svn.apache.org/viewvc?view=rev&rev=465111
Log:
Added negative() for testing negative test cases (must fail)

Modified:
    
incubator/ode/trunk/bpel-test/src/test/java/org/apache/ode/test/BPELTest.java

Modified: 
incubator/ode/trunk/bpel-test/src/test/java/org/apache/ode/test/BPELTest.java
URL: 
http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-test/src/test/java/org/apache/ode/test/BPELTest.java?view=diff&rev=465111&r1=465110&r2=465111
==============================================================================
--- 
incubator/ode/trunk/bpel-test/src/test/java/org/apache/ode/test/BPELTest.java 
(original)
+++ 
incubator/ode/trunk/bpel-test/src/test/java/org/apache/ode/test/BPELTest.java 
Tue Oct 17 17:40:40 2006
@@ -58,6 +58,15 @@
        protected void tearDown() throws Exception {
                server.stop();
        }
+
+  private void negative(String deployDir) throws Exception {
+      try {
+          go(deployDir);
+      } catch (junit.framework.AssertionFailedError ex) {
+          return;
+      }
+      fail("Expecting test to fail");
+  }
        
        private void go(String deployDir) throws Exception {
                
@@ -264,7 +273,7 @@
         * 
         * See JIRA ODE-67
         */
-       go("target/test-classes/bpel/2.0/NegativeTargetNSTest1");
+       negative("target/test-classes/bpel/2.0/NegativeTargetNSTest1");
     }
     
          public void testNegativeCorrelation() throws Exception {
@@ -277,7 +286,7 @@
                 * See JIRA ODE-64
                 * 
                 */
-           go("target/test-classes/bpel/2.0/NegativeCorrelationTest");
+           negative("target/test-classes/bpel/2.0/NegativeCorrelationTest");
       }
          public void testNegativeInitialization() throws Exception {
                        /**
@@ -293,7 +302,7 @@
                         * The message exchange should return with a 
Fault/Failure.
                         * 
                         */
-                   
go("target/test-classes/bpel/2.0/NegativeInitializationTest");
+                   
negative("target/test-classes/bpel/2.0/NegativeInitializationTest");
           }
 
     /** These tests compile however they fail at runtime */


Reply via email to