Modified expected exception type.

This commit is contained in:
Mark Fisher
2008-02-18 18:07:50 +00:00
parent 3719c32a0f
commit 0cbd5a3c9e
2 changed files with 7 additions and 7 deletions

View File

@@ -23,7 +23,7 @@ import java.util.Collection;
import org.junit.Test;
import org.springframework.integration.message.MessageDeliveryException;
import org.springframework.integration.MessagingException;
/**
* @author Mark Fisher
@@ -40,7 +40,7 @@ public class MethodInvokingSourceTests {
assertEquals("valid", result.iterator().next());
}
@Test(expected=MessageDeliveryException.class)
@Test(expected=MessagingException.class)
public void testNoMatchingMethodName() {
MethodInvokingSource<TestBean> source = new MethodInvokingSource<TestBean>();
source.setObject(new TestBean());
@@ -48,7 +48,7 @@ public class MethodInvokingSourceTests {
source.poll(5);
}
@Test(expected=MessageDeliveryException.class)
@Test(expected=MessagingException.class)
public void testInvalidMethodWithArg() {
MethodInvokingSource<TestBean> source = new MethodInvokingSource<TestBean>();
source.setObject(new TestBean());
@@ -56,7 +56,7 @@ public class MethodInvokingSourceTests {
source.poll(5);
}
@Test(expected=MessageDeliveryException.class)
@Test(expected=MessagingException.class)
public void testInvalidMethodWithNoReturnValue() {
MethodInvokingSource<TestBean> source = new MethodInvokingSource<TestBean>();
source.setObject(new TestBean());

View File

@@ -20,7 +20,7 @@ import static org.junit.Assert.assertTrue;
import org.junit.Test;
import org.springframework.integration.message.MessageDeliveryException;
import org.springframework.integration.MessagingException;
/**
* @author Mark Fisher
@@ -37,7 +37,7 @@ public class MethodInvokingTargetTests {
assertTrue(result);
}
@Test(expected=MessageDeliveryException.class)
@Test(expected=MessagingException.class)
public void testInvalidMethodWithNoArgs() {
MethodInvokingTarget<TestSink> target = new MethodInvokingTarget<TestSink>();
target.setObject(new TestSink());
@@ -56,7 +56,7 @@ public class MethodInvokingTargetTests {
assertTrue(result);
}
@Test(expected=MessageDeliveryException.class)
@Test(expected=MessagingException.class)
public void testNoMatchingMethodName() {
MethodInvokingTarget<TestSink> target = new MethodInvokingTarget<TestSink>();
target.setObject(new TestSink());