From c949d47de88a273b1eadba6c91cee78b494b55e1 Mon Sep 17 00:00:00 2001 From: Rick Ossendrijver Date: Tue, 27 Dec 2022 08:46:41 +0100 Subject: [PATCH] `s/runnable/throwingCallable/` --- .../refasterrules/JUnitToAssertJRules.java | 84 +++++++++---------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/JUnitToAssertJRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/JUnitToAssertJRules.java index 135847dc0ce..038572075c4 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/JUnitToAssertJRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/JUnitToAssertJRules.java @@ -315,135 +315,135 @@ void after(Object actual, Object expected, Supplier supplier) { static final class AssertThatThrownByIsExactlyInstanceOf { @BeforeTemplate - void before(Executable runnable, Class clazz) { - assertThrowsExactly(clazz, runnable); + void before(Executable throwingCallable, Class clazz) { + assertThrowsExactly(clazz, throwingCallable); } @AfterTemplate @UseImportPolicy(STATIC_IMPORT_ALWAYS) - void after(ThrowingCallable runnable, Class clazz) { - assertThatThrownBy(runnable).isExactlyInstanceOf(clazz); + void after(ThrowingCallable throwingCallable, Class clazz) { + assertThatThrownBy(throwingCallable).isExactlyInstanceOf(clazz); } } static final class AssertThatThrownByWithFailMessageStringIsExactlyInstanceOf< T extends Throwable> { @BeforeTemplate - void before(Executable runnable, Class clazz, String message) { - assertThrowsExactly(clazz, runnable, message); + void before(Executable throwingCallable, Class clazz, String message) { + assertThrowsExactly(clazz, throwingCallable, message); } @AfterTemplate @UseImportPolicy(STATIC_IMPORT_ALWAYS) - void after(ThrowingCallable runnable, Class clazz, String message) { - assertThatThrownBy(runnable).withFailMessage(message).isExactlyInstanceOf(clazz); + void after(ThrowingCallable throwingCallable, Class clazz, String message) { + assertThatThrownBy(throwingCallable).withFailMessage(message).isExactlyInstanceOf(clazz); } } static final class AssertThatThrownByWithFailMessageSupplierIsExactlyInstanceOf< T extends Throwable> { @BeforeTemplate - void before(Executable runnable, Class clazz, Supplier supplier) { - assertThrowsExactly(clazz, runnable, supplier); + void before(Executable throwingCallable, Class clazz, Supplier supplier) { + assertThrowsExactly(clazz, throwingCallable, supplier); } @AfterTemplate @UseImportPolicy(STATIC_IMPORT_ALWAYS) - void after(ThrowingCallable runnable, Class clazz, Supplier supplier) { - assertThatThrownBy(runnable).withFailMessage(supplier).isExactlyInstanceOf(clazz); + void after(ThrowingCallable throwingCallable, Class clazz, Supplier supplier) { + assertThatThrownBy(throwingCallable).withFailMessage(supplier).isExactlyInstanceOf(clazz); } } static final class AssertThatThrownByIsInstanceOf { @BeforeTemplate - void before(Executable runnable, Class clazz) { - assertThrows(clazz, runnable); + void before(Executable throwingCallable, Class clazz) { + assertThrows(clazz, throwingCallable); } @AfterTemplate @UseImportPolicy(STATIC_IMPORT_ALWAYS) - void after(ThrowingCallable runnable, Class clazz) { - assertThatThrownBy(runnable).isInstanceOf(clazz); + void after(ThrowingCallable throwingCallable, Class clazz) { + assertThatThrownBy(throwingCallable).isInstanceOf(clazz); } } static final class AssertThatThrownByWithFailMessageStringIsInstanceOf { @BeforeTemplate - void before(Executable runnable, Class clazz, String message) { - assertThrows(clazz, runnable, message); + void before(Executable throwingCallable, Class clazz, String message) { + assertThrows(clazz, throwingCallable, message); } @AfterTemplate @UseImportPolicy(STATIC_IMPORT_ALWAYS) - void after(ThrowingCallable runnable, Class clazz, String message) { - assertThatThrownBy(runnable).withFailMessage(message).isInstanceOf(clazz); + void after(ThrowingCallable throwingCallable, Class clazz, String message) { + assertThatThrownBy(throwingCallable).withFailMessage(message).isInstanceOf(clazz); } } static final class AssertThatThrownByWithFailMessageSupplierIsInstanceOf { @BeforeTemplate - void before(Executable runnable, Class clazz, Supplier supplier) { - assertThrows(clazz, runnable, supplier); + void before(Executable throwingCallable, Class clazz, Supplier supplier) { + assertThrows(clazz, throwingCallable, supplier); } @AfterTemplate @UseImportPolicy(STATIC_IMPORT_ALWAYS) - void after(ThrowingCallable runnable, Class clazz, Supplier supplier) { - assertThatThrownBy(runnable).withFailMessage(supplier).isInstanceOf(clazz); + void after(ThrowingCallable throwingCallable, Class clazz, Supplier supplier) { + assertThatThrownBy(throwingCallable).withFailMessage(supplier).isInstanceOf(clazz); } } static final class AssertThatCodeDoesNotThrowAnyException { @BeforeTemplate - void before(Executable runnable) { - assertDoesNotThrow(runnable); + void before(Executable throwingCallable) { + assertDoesNotThrow(throwingCallable); } @BeforeTemplate - void before(ThrowingSupplier runnable) { - assertDoesNotThrow(runnable); + void before(ThrowingSupplier throwingCallable) { + assertDoesNotThrow(throwingCallable); } @AfterTemplate @UseImportPolicy(STATIC_IMPORT_ALWAYS) - void after(ThrowingCallable runnable) { - assertThatCode(runnable).doesNotThrowAnyException(); + void after(ThrowingCallable throwingCallable) { + assertThatCode(throwingCallable).doesNotThrowAnyException(); } } static final class AssertThatCodeWithFailMessageStringDoesNotThrowAnyException { @BeforeTemplate - void before(Executable runnable, String message) { - assertDoesNotThrow(runnable, message); + void before(Executable throwingCallable, String message) { + assertDoesNotThrow(throwingCallable, message); } @BeforeTemplate - void before(ThrowingSupplier runnable, String message) { - assertDoesNotThrow(runnable, message); + void before(ThrowingSupplier throwingCallable, String message) { + assertDoesNotThrow(throwingCallable, message); } @AfterTemplate @UseImportPolicy(STATIC_IMPORT_ALWAYS) - void after(ThrowingCallable runnable, String message) { - assertThatCode(runnable).withFailMessage(message).doesNotThrowAnyException(); + void after(ThrowingCallable throwingCallable, String message) { + assertThatCode(throwingCallable).withFailMessage(message).doesNotThrowAnyException(); } } static final class AssertThatCodeWithFailMessageSupplierDoesNotThrowAnyException { @BeforeTemplate - void before(Executable runnable, Supplier supplier) { - assertDoesNotThrow(runnable, supplier); + void before(Executable throwingCallable, Supplier supplier) { + assertDoesNotThrow(throwingCallable, supplier); } @BeforeTemplate - void before(ThrowingSupplier runnable, Supplier supplier) { - assertDoesNotThrow(runnable, supplier); + void before(ThrowingSupplier throwingCallable, Supplier supplier) { + assertDoesNotThrow(throwingCallable, supplier); } @AfterTemplate @UseImportPolicy(STATIC_IMPORT_ALWAYS) - void after(ThrowingCallable runnable, Supplier supplier) { - assertThatCode(runnable).withFailMessage(supplier).doesNotThrowAnyException(); + void after(ThrowingCallable throwingCallable, Supplier supplier) { + assertThatCode(throwingCallable).withFailMessage(supplier).doesNotThrowAnyException(); } }