Skip to content

Commit

Permalink
add assertDoesNotThrow in after litest
Browse files Browse the repository at this point in the history
  • Loading branch information
leaderli committed Mar 4, 2024
1 parent bdec99f commit 3fd0790
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@ public static void clearMethodCalled() {
}

public static void reset() {
Recorder.assertThrow.clear();
originClasses.forEach((k, v) -> {
try {
detach(k);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ public class LiMockAfterEachCallback implements AfterEachCallback {
@Override
public void afterEach(ExtensionContext context) {
LiMock.assertMethodCalled();
LiMock.assertDoesNotThrow();
LiMock.reset();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ void testRecordBean() {
.assertReturn(1)
.build();
Assertions.assertThrows(AssertionFailedError.class, LiMock::assertMethodCalled);

bean.m1();
Assertions.assertDoesNotThrow(LiMock::assertMethodCalled);
LiMock.recordBean(Bean1.class).when(Bean1::m1)
Expand Down Expand Up @@ -410,7 +411,6 @@ void testRecordInLira() {
});

Assertions.assertThrows(Throwable.class, LiMock::assertDoesNotThrow);
Recorder.assertThrow.clear();

}

Expand Down

0 comments on commit 3fd0790

Please sign in to comment.