Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2722 from dropwizard/issue-2721
Allow to disable logging bootstrap in DAOTest
- Loading branch information
Showing
3 changed files
with
35 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...ing/src/test/java/io/dropwizard/testing/junit/DAOTestRuleWithoutLoggingBootstrapTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package io.dropwizard.testing.junit; | ||
|
||
import io.dropwizard.testing.app.TestEntity; | ||
import org.hibernate.SessionFactory; | ||
import org.junit.Rule; | ||
import org.junit.Test; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
public class DAOTestRuleWithoutLoggingBootstrapTest { | ||
@SuppressWarnings("deprecation") | ||
@Rule | ||
public final DAOTestRule daoTestRule = DAOTestRule.newBuilder() | ||
.addEntityClass(TestEntity.class) | ||
.bootstrapLogging(false) | ||
.build(); | ||
|
||
@Test | ||
public void ruleCreatedSessionFactory() { | ||
final SessionFactory sessionFactory = daoTestRule.getSessionFactory(); | ||
|
||
assertThat(sessionFactory).isNotNull(); | ||
} | ||
} |