DATACMNS-1554 - Polishing.

Replace AtTest(expected = …) and ExpectedException with the corresponding AssertJ assertThatExceptionOfType(…) and assertThatIllegalArgumentException().isThrownBy(…).
This commit is contained in:
Mark Paluch
2019-07-10 11:47:46 +02:00
parent 660006b8c9
commit 704913c866
79 changed files with 457 additions and 474 deletions

View File

@@ -111,12 +111,13 @@ public class ChainedTransactionManagerTests {
}
@Test(expected = UnexpectedRollbackException.class)
@Test
public void shouldThrowExceptionOnFailingRollback() {
PlatformTransactionManager first = createFailingTransactionManager("first");
setupTransactionManagers(first);
createAndRollbackTransaction();
assertThatExceptionOfType(UnexpectedRollbackException.class).isThrownBy(this::createAndRollbackTransaction);
}
private void setupTransactionManagers(PlatformTransactionManager... transactionManagers) {