Otavio Rodolfo Piske created CAMEL-21196:
--------------------------------------------
Summary: camel-core: modernize throws/no throws assertions
Key: CAMEL-21196
URL: https://issues.apache.org/jira/browse/CAMEL-21196
Project: Camel
Issue Type: Test
Affects Versions: 4.8.0
Reporter: Otavio Rodolfo Piske
Assignee: Nikita_Konovalov
Fix For: 4.x
Code like the one below should be modified to use modern JUnit 5 assertions:
{code:java}
try {
DefaultFluentProducerTemplate.on(context).withBody("Hello
World").to("direct:exception").request();
fail("Should have thrown RuntimeCamelException");
} catch (RuntimeCamelException e) {
boolean b = e.getCause() instanceof IllegalArgumentException;
assertTrue(b);
assertEquals("Forced exception by unit test",
e.getCause().getMessage());
}
{code}
This should be replaced with {{Assertions.assertDoesNotThrow}} and
{{Assertions.assertThrows}} as needed.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)