dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #38160
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19484: Compilation fix
------------------------------------------------------------
revno: 19484
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-06-22 10:07:22 +0200
message:
Compilation fix
modified:
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/common/IdentifiableObjectManagerTest.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/common/IdentifiableObjectManagerTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/common/IdentifiableObjectManagerTest.java 2015-06-22 01:59:59 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/common/IdentifiableObjectManagerTest.java 2015-06-22 08:07:22 +0000
@@ -28,7 +28,18 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import com.google.common.collect.Sets;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.GregorianCalendar;
+import java.util.List;
+import java.util.Set;
+
import org.hibernate.SessionFactory;
import org.hisp.dhis.DhisSpringTest;
import org.hisp.dhis.acl.AccessStringHelper;
@@ -47,14 +58,7 @@
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.GregorianCalendar;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import static org.junit.Assert.*;
+import com.google.common.collect.Sets;
/**
* @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
@@ -102,7 +106,6 @@
assertEquals( dataElementGroupB, identifiableObjectManager.getObject( dataElementGroupIdB, DataElementGroup.class.getSimpleName() ) );
}
- /*
@Test
public void testGetWithClasses()
{
@@ -111,16 +114,12 @@
dataElementService.addDataElement( dataElementA );
dataElementService.addDataElement( dataElementB );
-
- Set<Class<? extends IdentifiableObject>> classes = new HashSet<>();
- classes.add( DataElement.class );
- classes.add( DataSet.class );
- classes.add( Indicator.class );
-
- assertEquals( dataElementA, identifiableObjectManager.get( DataDimension.DATA_DIMENSION_CLASSES, dataElementA.getUid() ) );
- assertEquals( dataElementB, identifiableObjectManager.get( DataDimension.DATA_DIMENSION_CLASSES, dataElementB.getUid() ) );
+
+ Set<Class<IdentifiableObject>> classes = IdentifiableObjectUtils.asTypedClassSet( DataElement.class, DataSet.class, Indicator.class );
+
+ assertEquals( dataElementA, identifiableObjectManager.get( classes, dataElementA.getUid() ) );
+ assertEquals( dataElementB, identifiableObjectManager.get( classes, dataElementB.getUid() ) );
}
- */
@Test
public void publicAccessSetIfNoUser()