mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-22 20:12:11 +00:00
DATAES-43 : Add Test cases for CDI Repository
This commit is contained in:
parent
7828612f15
commit
5c6557e5b9
@ -22,7 +22,7 @@ import org.springframework.data.repository.CrudRepository;
|
||||
* @author Mohsin Husen
|
||||
*/
|
||||
|
||||
public interface CdiProductRepository extends CrudRepository<Product, String> {
|
||||
public interface CDIProductRepository extends CrudRepository<Product, String> {
|
||||
|
||||
Product findOne(String id);
|
||||
|
||||
|
@ -20,16 +20,16 @@ import javax.inject.Inject;
|
||||
/**
|
||||
* @author Mohsin Husen
|
||||
*/
|
||||
class CdiRepositoryClient {
|
||||
class CDIRepositoryClient {
|
||||
|
||||
private CdiProductRepository repository;
|
||||
private CDIProductRepository repository;
|
||||
|
||||
public CdiProductRepository getRepository() {
|
||||
public CDIProductRepository getRepository() {
|
||||
return repository;
|
||||
}
|
||||
|
||||
@Inject
|
||||
public void setRepository(CdiProductRepository repository) {
|
||||
public void setRepository(CDIProductRepository repository) {
|
||||
this.repository = repository;
|
||||
}
|
||||
|
||||
|
@ -26,10 +26,10 @@ import static org.junit.Assert.*;
|
||||
* @author Mohsin Husen
|
||||
*/
|
||||
|
||||
public class CdiRepositoryTests {
|
||||
public class CDIRepositoryTests {
|
||||
|
||||
private static CdiTestContainer cdiContainer;
|
||||
private CdiProductRepository repository;
|
||||
private CDIProductRepository repository;
|
||||
|
||||
@BeforeClass
|
||||
public static void init() throws Exception {
|
||||
@ -46,7 +46,7 @@ public class CdiRepositoryTests {
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
CdiRepositoryClient client = cdiContainer.getInstance(CdiRepositoryClient.class);
|
||||
CDIRepositoryClient client = cdiContainer.getInstance(CDIRepositoryClient.class);
|
||||
repository = client.getRepository();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user