Permalink
Browse files

Added unit test for mistyped URI

git-svn-id: https://svn.apache.org/repos/asf/activemq/camel/trunk@640963 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
davsclaus committed Mar 25, 2008
1 parent 97f3469 commit 5f0f55a4f14fe061e96eeca4cff60a1577cd5969
@@ -40,4 +40,16 @@ public void testUnknownProtocol() {
}
}
public void testMistypedProtocol() {
try {
// the protocol is mistyped as a colon is missing after tcp
template.setDefaultEndpointUri("mina:tcp//localhost:8080");
template.sendBody("mina:tcp//localhost:8080");
fail("Should have thrown a ResolveEndpointFailedException");
} catch (ResolveEndpointFailedException e) {
assertTrue("Should be an IAE exception", e.getCause() instanceof IllegalArgumentException);
assertEquals("Unrecognised MINA protocol: null for uri: mina:tcp//localhost:8080", e.getCause().getMessage());
}
}
}

0 comments on commit 5f0f55a

Please sign in to comment.