Skip to content

Commit

Permalink
[quarkusio#36582] Add test case to TransactionalUniAsserterTest
Browse files Browse the repository at this point in the history
Test that `assert.fail()` actually makes the test fails
  • Loading branch information
DavideD committed Oct 31, 2023
1 parent a0eede0 commit 4133b5f
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;

import org.junit.jupiter.api.Test;
import org.opentest4j.AssertionFailedError;

import io.quarkus.hibernate.reactive.panache.Panache;
import io.quarkus.test.hibernate.reactive.panache.TransactionalUniAsserter;
Expand All @@ -30,4 +32,9 @@ public void testTransactionalUniAsserter(TransactionalUniAsserter asserter) {
});
}

@Test
@RunOnVertxContext
public void testFailure(final TransactionalUniAsserter asserter) {
assertThrows(AssertionFailedError.class, asserter::fail);
}
}

0 comments on commit 4133b5f

Please sign in to comment.