dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #33199
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16935: Test fix
------------------------------------------------------------
revno: 16935
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-10-02 12:35:54 +0200
message:
Test fix
modified:
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementCategoryServiceTest.java
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementGroupStoreTest.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementCategoryServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementCategoryServiceTest.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementCategoryServiceTest.java 2014-10-02 10:35:54 +0000
@@ -30,6 +30,7 @@
import org.hisp.dhis.DhisSpringTest;
import org.junit.Test;
+import org.springframework.beans.factory.annotation.Autowired;
import java.util.ArrayList;
import java.util.Collection;
@@ -53,6 +54,9 @@
private List<DataElementCategoryOption> categoryOptions;
+ @Autowired
+ private DataElementCategoryService categoryService;
+
// -------------------------------------------------------------------------
// Fixture
// -------------------------------------------------------------------------
@@ -60,8 +64,6 @@
@Override
public void setUpTest()
{
- categoryService = (DataElementCategoryService) getBean( DataElementCategoryService.ID );
-
categoryOptionA = createCategoryOption( 'A' );
categoryOptionB = createCategoryOption( 'B' );
categoryOptionC = createCategoryOption( 'C' );
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementGroupStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementGroupStoreTest.java 2014-03-24 22:27:13 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementGroupStoreTest.java 2014-10-02 10:35:54 +0000
@@ -35,6 +35,8 @@
import java.util.Collection;
+import javax.annotation.Resource;
+
import org.hisp.dhis.DhisSpringTest;
import org.hisp.dhis.common.GenericIdentifiableObjectStore;
import org.junit.Test;
@@ -43,18 +45,12 @@
* @author Lars Helge Overland
* @version $Id$
*/
-@SuppressWarnings( "unchecked" )
public class DataElementGroupStoreTest
extends DhisSpringTest
{
+ @Resource(name="org.hisp.dhis.dataelement.DataElementGroupStore")
private GenericIdentifiableObjectStore<DataElementGroup> dataElementGroupStore;
- @Override
- public void setUpTest()
- {
- dataElementGroupStore = (GenericIdentifiableObjectStore<DataElementGroup>) getBean( "org.hisp.dhis.dataelement.DataElementGroupStore" );
- }
-
@Test
public void testAddDataElementGroup()
{