Skip to content

Commit 7fab8e4

Browse files
committed
fix(test): remove unnecessary OptionalSubject.optionals()
1 parent e28845e commit 7fab8e4

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

cloud-core/src/test/java/org/incendo/cloud/truth/ArgumentParseResultSubject.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ private ArgumentParseResultSubject(final @NonNull FailureMetadata metadata, fina
6060
if (this.actual == null) {
6161
this.failWithActual(Fact.simpleFact("expected to not be null"));
6262
}
63-
return this.check("parsedValue()").about(OptionalSubject.optionals()).that(this.actual.parsedValue());
63+
return this.check("parsedValue()").that(this.actual.parsedValue());
6464
}
6565

6666
public @NonNull OptionalSubject failure() {
6767
if (this.actual == null) {
6868
this.failWithActual(Fact.simpleFact("expected to not be null"));
6969
}
70-
return this.check("failure()").about(OptionalSubject.optionals()).that(this.actual.failure());
70+
return this.check("failure()").that(this.actual.failure());
7171
}
7272

7373
public void hasParsedValue(final @NonNull T value) {

cloud-core/src/test/java/org/incendo/cloud/truth/CompletableFutureSubject.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ private CompletableFutureSubject(
7575
if (join == null) {
7676
this.failWithActual(Fact.simpleFact("expected result to not be null"));
7777
}
78-
return this.check("join() result or null on failure").about(OptionalSubject.optionals()).that(Optional.of(join));
78+
return this.check("join() result or null on failure").that(Optional.of(join));
7979
} catch (final CompletionException e) {
80-
return this.check("join() result or null on failure").about(OptionalSubject.optionals()).that(Optional.empty());
80+
return this.check("join() result or null on failure").that(Optional.empty());
8181
}
8282
}
8383

@@ -87,9 +87,9 @@ private CompletableFutureSubject(
8787
}
8888
try {
8989
this.actual.join();
90-
return this.check("cause of CompletionException thrown by join()").about(OptionalSubject.optionals()).that(Optional.empty());
90+
return this.check("cause of CompletionException thrown by join()").that(Optional.empty());
9191
} catch (final CompletionException e) {
92-
return this.check("cause of CompletionException thrown by join()").about(OptionalSubject.optionals()).that(Optional.of(e.getCause()));
92+
return this.check("cause of CompletionException thrown by join()").that(Optional.of(e.getCause()));
9393
}
9494
}
9595

0 commit comments

Comments
 (0)