-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding persistence components to SupplyChainValidationSummaryTest - n…
…ot currently working
- Loading branch information
1 parent
ec3a077
commit 4f00013
Showing
3 changed files
with
69 additions
and
6 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
23 changes: 23 additions & 0 deletions
23
HIRS_AttestationCA/src/test/java/hirs/attestationca/persist/SpringPersistenceTest.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,23 @@ | ||
package hirs.attestationca.persist; | ||
|
||
import org.hibernate.SessionFactory; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.test.annotation.DirtiesContext; | ||
import org.springframework.test.context.ContextConfiguration; | ||
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests; | ||
|
||
/** | ||
* Base class that autowires a session factory for use of | ||
* any tests that need a database connection. | ||
*/ | ||
@ContextConfiguration(classes = PersistenceConfiguration.class) | ||
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS) | ||
public class SpringPersistenceTest extends AbstractJUnit4SpringContextTests { | ||
|
||
/** | ||
* Autowired session factory. | ||
*/ | ||
@SuppressWarnings("checkstyle:visibilitymodifier") | ||
@Autowired | ||
protected SessionFactory sessionFactory; | ||
} |
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