Skip to content

Commit ae1e7f0

Browse files
committed
Fix tests
1 parent 9afa6aa commit ae1e7f0

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

src/test/java/com/commercetools/project/sync/CliRunnerTest.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,15 @@ void run_WithEmptyArgumentList_ShouldFailAndLogError() {
112112
.singleElement()
113113
.satisfies(
114114
loggingEvent -> {
115-
// assertThat(loggingEvent.getLevel()).isEqualTo(Level.ERROR);
115+
assertThat(loggingEvent.getLevel()).isEqualTo(Level.ERROR);
116116
assertThat(loggingEvent.getMessage()).contains("Failed to run sync process.");
117-
// final Optional<Throwable> actualThrowableOpt =
118-
// loggingEvent.getThrowable();
119-
// assertThat(actualThrowableOpt).isNotNull();
120-
// assertThat(actualThrowableOpt.isPresent()).isTrue();
121-
// final Throwable actualThrowable = actualThrowableOpt.get();
122-
// assertThat(actualThrowable).isExactlyInstanceOf(CliException.class);
123-
// assertThat(actualThrowable.getMessage())
124-
// .contains("Please pass at least 1 option to the CLI.");
117+
final Optional<Throwable> actualThrowableOpt = loggingEvent.getThrowable();
118+
assertThat(actualThrowableOpt).isNotNull();
119+
assertThat(actualThrowableOpt.isPresent()).isTrue();
120+
final Throwable actualThrowable = actualThrowableOpt.get();
121+
assertThat(actualThrowable).isExactlyInstanceOf(CliException.class);
122+
assertThat(actualThrowable.getMessage())
123+
.contains("Please pass at least 1 option to the CLI.");
125124
});
126125
}
127126

0 commit comments

Comments
 (0)