mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-04-07 11:26:51 +00:00
Adding SpringPersistenceTest and necessary implementation in HIRS_AttestationCA build.gradle file
This commit is contained in:
parent
9b9da1b708
commit
df83fb6064
@ -29,6 +29,7 @@ dependencies {
|
||||
implementation 'org.springframework.boot:spring-boot-starter-data-jpa:3.0.1'
|
||||
implementation 'com.github.darrachequesne:spring-data-jpa-datatables:6.0.1'
|
||||
implementation 'org.springframework.retry:spring-retry:2.0.0'
|
||||
implementation 'org.springframework:spring-test:6.0.11'
|
||||
implementation libs.springdatajpa
|
||||
|
||||
implementation libs.bouncycastle
|
||||
|
@ -0,0 +1,24 @@
|
||||
package hirs.attestationca.persist;
|
||||
|
||||
import hirs.attestationca.persist.PersistenceConfiguration;
|
||||
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;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user