Skip to content

Commit d0026c3

Browse files
jakubmalekJakub Malek
authored andcommitted
Typo rename
1 parent 3cb4e5f commit d0026c3

File tree

11 files changed

+28
-27
lines changed

11 files changed

+28
-27
lines changed

build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,16 @@ tasks {
9090
test {
9191
useJUnitPlatform()
9292
systemProperty("file.encoding", "UTF-8")
93-
finalizedBy(jacocoTestReport)
9493
finalizedBy(junit4Test)
94+
finalizedBy(jacocoTestReport)
9595
testLogging {
9696
events("passed", "skipped", "failed")
9797
}
9898
}
9999
// Jacoco tasks
100100
jacocoTestReport {
101101
dependsOn(test)
102+
dependsOn(junit4Test)
102103
executionData(fileTree(project.buildDir).include("jacoco/*.exec"))
103104
finalizedBy(jacocoTestCoverageVerification)
104105
reports {

lombok.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ config.stopBubbling = true
22
lombok.toString.doNotUseGetters = true
33
lombok.equalsAndHashCode.doNotUseGetters = true
44
lombok.log.fieldName = LOG
5-
lombok.singular.useGuava = true
5+
lombok.singular.useGuava = false
66
lombok.builder.classname = Builder

src/junit4Test/java/com/webfleet/assertj/AsyncAssertionErrorCreatorJUnit4Test.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515
public class AsyncAssertionErrorCreatorJUnit4Test
1616
{
17-
private static final AsyncAssertAwaiConfig CONFIG = AsyncAssertAwaiConfig.withTimeout(Duration.ofSeconds(4));
17+
private static final AsyncAssertAwaitConfig CONFIG = AsyncAssertAwaitConfig.withTimeout(Duration.ofSeconds(4));
1818

1919
@Test
2020
public void shouldCreateAsyncAssertionErrorForSingleError()

src/main/java/com/webfleet/assertj/AsyncAssertAwaiConfig.java renamed to src/main/java/com/webfleet/assertj/AsyncAssertAwaitConfig.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,25 @@
2020
@Getter
2121
@EqualsAndHashCode
2222
@ToString
23-
final class AsyncAssertAwaiConfig
23+
final class AsyncAssertAwaitConfig
2424
{
2525
private static final Duration DEFAULT_CHECK_INTERVAL = Duration.ofMillis(100L);
2626
private static final Duration DEFAULT_SHORT_CHECK_INTERVAL = Duration.ofMillis(50L);
2727

2828
private final Duration timeout;
2929
private final Duration checkInterval;
3030

31-
static AsyncAssertAwaiConfig withTimeout(@NonNull final Duration timeout)
31+
static AsyncAssertAwaitConfig withTimeout(@NonNull final Duration timeout)
3232
{
3333
if (timeout.compareTo(ZERO) <= 0)
3434
{
3535
throw new IllegalArgumentException("timeout must be greater than zero");
3636
}
3737
final var checkInterval = computeCheckInterval(timeout);
38-
return new AsyncAssertAwaiConfig(timeout, checkInterval);
38+
return new AsyncAssertAwaitConfig(timeout, checkInterval);
3939
}
4040

41-
AsyncAssertAwaiConfig withCheckInterval(@NonNull final Duration checkInterval)
41+
AsyncAssertAwaitConfig withCheckInterval(@NonNull final Duration checkInterval)
4242
{
4343
if (checkInterval.compareTo(ZERO) <= 0)
4444
{
@@ -48,7 +48,7 @@ AsyncAssertAwaiConfig withCheckInterval(@NonNull final Duration checkInterval)
4848
{
4949
throw new IllegalArgumentException("checkInterval must be lower than or equal to timeout");
5050
}
51-
return new AsyncAssertAwaiConfig(timeout, checkInterval);
51+
return new AsyncAssertAwaitConfig(timeout, checkInterval);
5252
}
5353

5454
Duration checkInterval(@NonNull final ElapsedTime elapsedTime)

src/main/java/com/webfleet/assertj/AsyncAssertImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
final class AsyncAssertImpl implements AsyncAssert
1515
{
1616
private final Time time;
17-
private final AsyncAssertAwaiConfig config;
17+
private final AsyncAssertAwaitConfig config;
1818
private final Object waitMutex;
1919

20-
AsyncAssertImpl(@NonNull final Time time, @NonNull final AsyncAssertAwaiConfig config)
20+
AsyncAssertImpl(@NonNull final Time time, @NonNull final AsyncAssertAwaitConfig config)
2121
{
2222
this(time, config, new Object());
2323
}

src/main/java/com/webfleet/assertj/AsyncAssertResult.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ boolean hasFailed()
4040
return error != null;
4141
}
4242

43-
void throwOnFailure(@NonNull final AsyncAssertAwaiConfig config)
43+
void throwOnFailure(@NonNull final AsyncAssertAwaitConfig config)
4444
{
4545
if (hasFailed())
4646
{

src/main/java/com/webfleet/assertj/AsyncAssertionErrorCreator.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ final class AsyncAssertionErrorCreator
2828
*/
2929
private static final String ASYNC_ASSERTION_ERROR_CLASS = "com.webfleet.assertj.AsyncAssertionError";
3030

31-
private static final BiFunction<AsyncAssertAwaiConfig, AssertionError, AssertionError> CREATOR =
31+
private static final BiFunction<AsyncAssertAwaitConfig, AssertionError, AssertionError> CREATOR =
3232
tryLoadAsyncAssertionErrorClass()
3333
.map(AsyncAssertionErrorCreator::asyncAssertionErrorCreator)
3434
.orElseGet(AsyncAssertionErrorCreator::fallbackCreator);
3535

36-
static AssertionError create(@NonNull final AsyncAssertAwaiConfig config, @NonNull final AssertionError error)
36+
static AssertionError create(@NonNull final AsyncAssertAwaitConfig config, @NonNull final AssertionError error)
3737
{
3838
return CREATOR.apply(config, error);
3939
}
@@ -51,14 +51,14 @@ private static Optional<Class<?>> tryLoadAsyncAssertionErrorClass()
5151
}
5252
}
5353

54-
private static BiFunction<AsyncAssertAwaiConfig, AssertionError, AssertionError> asyncAssertionErrorCreator(final Class<?> asyncAssertionErrorClass)
54+
private static BiFunction<AsyncAssertAwaitConfig, AssertionError, AssertionError> asyncAssertionErrorCreator(final Class<?> asyncAssertionErrorClass)
5555
{
5656
final var method = ReflectionCall.run(() -> asyncAssertionErrorClass
5757
.getDeclaredMethod("create", String.class, AssertionError.class));
5858
return (config, error) -> ReflectionCall.run(() -> (AssertionError) method.invoke(null, createHeading(config), error));
5959
}
6060

61-
private static BiFunction<AsyncAssertAwaiConfig, AssertionError, AssertionError> fallbackCreator()
61+
private static BiFunction<AsyncAssertAwaitConfig, AssertionError, AssertionError> fallbackCreator()
6262
{
6363
return (config, error) -> {
6464
final var errors = aggregateErrors(error);
@@ -85,7 +85,7 @@ private static List<String> aggregateErrors(final AssertionError error)
8585
return singletonList(error.getMessage());
8686
}
8787

88-
private static String createHeading(final AsyncAssertAwaiConfig config)
88+
private static String createHeading(final AsyncAssertAwaitConfig config)
8989
{
9090
return String.format("Async assertion failed after exceeding %sms timeout", config.timeout().toMillis());
9191
}

src/main/java/com/webfleet/assertj/AsyncAssertions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public final class AsyncAssertions
2929
*/
3030
public static AsyncAssert awaitAtMost(@NonNull final Duration timeout)
3131
{
32-
return new AsyncAssertImpl(SystemTime.UTC, AsyncAssertAwaiConfig.withTimeout(timeout));
32+
return new AsyncAssertImpl(SystemTime.UTC, AsyncAssertAwaitConfig.withTimeout(timeout));
3333
}
3434

3535
/**

src/test/java/com/webfleet/assertj/AsyncAssertAwaitConfigTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class AsyncAssertAwaitConfigTest
2222
void shouldThrowExceptionOnCreationWithNullTimeout()
2323
{
2424
// when
25-
final var caughtException = catchThrowable(() -> AsyncAssertAwaiConfig.withTimeout(null));
25+
final var caughtException = catchThrowable(() -> AsyncAssertAwaitConfig.withTimeout(null));
2626

2727
// then
2828
assertThat(caughtException)
@@ -35,7 +35,7 @@ void shouldThrowExceptionOnCreationWithNullTimeout()
3535
void shouldThrowExceptionOnCreationWithNegativeOrZeroTimeout(final Duration timeout)
3636
{
3737
// when
38-
final var caughtException = catchThrowable(() -> AsyncAssertAwaiConfig.withTimeout(timeout));
38+
final var caughtException = catchThrowable(() -> AsyncAssertAwaitConfig.withTimeout(timeout));
3939

4040
// then
4141
assertThat(caughtException)
@@ -66,7 +66,7 @@ void shouldComputeInitialCheckIntervalBasedOnTimeout(final Duration timeout,
6666
final SoftAssertions softly)
6767
{
6868
// when
69-
final var tested = AsyncAssertAwaiConfig.withTimeout(timeout);
69+
final var tested = AsyncAssertAwaitConfig.withTimeout(timeout);
7070

7171
// then
7272
softly.assertThat(tested.checkInterval()).isEqualTo(expectedCheckInterval);
@@ -87,7 +87,7 @@ void shouldReturnAsyncAssertAwaitConfigWithChangedWaitInterval(final Duration ti
8787
final SoftAssertions softly)
8888
{
8989
// given
90-
final var tested = AsyncAssertAwaiConfig.withTimeout(timeout);
90+
final var tested = AsyncAssertAwaitConfig.withTimeout(timeout);
9191

9292
// when
9393
final var withWaitInterval = tested.withCheckInterval(waitInterval);
@@ -122,7 +122,7 @@ void shouldShortenCheckIntervalWhenAddedToElapsedTimeExceedsTimeout(final Durati
122122
final Duration expectedCheckInterval)
123123
{
124124
// given
125-
final var config = AsyncAssertAwaiConfig.withTimeout(timeout)
125+
final var config = AsyncAssertAwaitConfig.withTimeout(timeout)
126126
.withCheckInterval(configuredCheckInterval);
127127
final ElapsedTime elapsedTime = () -> elapsedTimeDuration;
128128

@@ -138,7 +138,7 @@ void shouldThrowExceptionWhenChangedCheckIntervalIsGreaterThanTimeout()
138138
{
139139
// given
140140
final var timeout = Duration.ofSeconds(5);
141-
final var tested = AsyncAssertAwaiConfig.withTimeout(timeout);
141+
final var tested = AsyncAssertAwaitConfig.withTimeout(timeout);
142142

143143
// when
144144
final var caughtException = catchThrowable(() -> tested.withCheckInterval(timeout.plusMillis(1)));
@@ -154,7 +154,7 @@ void shouldThrowExceptionWhenChangedCheckIntervalIsGreaterThanTimeout()
154154
void shouldThrowExceptionWhenChangedCheckIntervalIsNegativeOrZero(final Duration checkInterval)
155155
{
156156
// given
157-
final var tested = AsyncAssertAwaiConfig.withTimeout(Duration.ofSeconds(1L));
157+
final var tested = AsyncAssertAwaitConfig.withTimeout(Duration.ofSeconds(1L));
158158

159159
// when
160160
final var caughtException = catchThrowable(() -> tested.withCheckInterval(checkInterval));
@@ -169,7 +169,7 @@ void shouldThrowExceptionWhenChangedCheckIntervalIsNegativeOrZero(final Duration
169169
void shouldThrowExceptionWhenChangedCheckIntervalIsNull()
170170
{
171171
// given
172-
final var tested = AsyncAssertAwaiConfig.withTimeout(Duration.ofSeconds(1L));
172+
final var tested = AsyncAssertAwaitConfig.withTimeout(Duration.ofSeconds(1L));
173173

174174
// when
175175
final var caughtException = catchThrowable(() -> tested.withCheckInterval(null));

src/test/java/com/webfleet/assertj/AsyncAssertTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
@ExtendWith(SoftAssertionsExtension.class)
1717
class AsyncAssertTest
1818
{
19-
private static final AsyncAssertAwaiConfig CONFIG = AsyncAssertAwaiConfig
19+
private static final AsyncAssertAwaitConfig CONFIG = AsyncAssertAwaitConfig
2020
.withTimeout(Duration.ofSeconds(5))
2121
.withCheckInterval(Duration.ofSeconds(1));
2222

0 commit comments

Comments
 (0)