[
https://issues.apache.org/jira/browse/CAMEL-21196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Otavio Rodolfo Piske updated CAMEL-21196:
-----------------------------------------
Fix Version/s: 4.18.0
(was: 4.x)
> camel-core: modernize throws/no throws assertions
> -------------------------------------------------
>
> Key: CAMEL-21196
> URL: https://issues.apache.org/jira/browse/CAMEL-21196
> Project: Camel
> Issue Type: Test
> Components: tests
> Affects Versions: 4.8.0
> Reporter: Otavio Rodolfo Piske
> Assignee: Otavio Rodolfo Piske
> Priority: Minor
> Fix For: 4.18.0
>
>
> 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)