mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-03-26 05:47:49 +00:00
Reloaded the unit test
This commit is contained in:
parent
53c565717d
commit
5ec4d8e415
@ -0,0 +1,12 @@
|
||||
package hirs.attestationca.repository;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
//import org.springframework.data.jpa.respository.JpaRepository;
|
||||
|
||||
/**
|
||||
* Setting up for new creation for CRUD operations.
|
||||
*/
|
||||
@Repository
|
||||
public interface DeviceRepository { // extends JpaRepository<Device, UUID> {
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Contains class structures for the interface and base CRUD operations for hibernate.
|
||||
*/
|
||||
package hirs.attestationca.repository;
|
@ -0,0 +1,23 @@
|
||||
package hirs.data.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.testng.AbstractTestNGSpringContextTests;
|
||||
|
||||
/**
|
||||
* 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 AbstractTestNGSpringContextTests {
|
||||
|
||||
/**
|
||||
* Autowired session factory.
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:visibilitymodifier")
|
||||
@Autowired
|
||||
protected SessionFactory sessionFactory;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user