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 acc6079 commit e1ab580
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
import io.quarkus.test.hibernate.reactive.panache.TransactionalUniAsserter;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.vertx.RunOnVertxContext;
import org.opentest4j.AssertionFailedError;

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;

@QuarkusTest
public class TransactionalUniAsserterTest {
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 e1ab580

Please sign in to comment.