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 614d9d6 commit 6b52fd6
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
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;
import io.quarkus.test.junit.QuarkusTest;
Expand All @@ -30,4 +33,9 @@ public void testTransactionalUniAsserter(TransactionalUniAsserter asserter) {
});
}

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

0 comments on commit 6b52fd6

Please sign in to comment.