dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #24779
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12198: minor test fix
------------------------------------------------------------
revno: 12198
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-09-23 09:29:58 +0200
message:
minor test fix
modified:
dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/NoRegistrationSingleEventServiceTest.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-dxf2/src/test/java/org/hisp/dhis/dxf2/events/NoRegistrationSingleEventServiceTest.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/NoRegistrationSingleEventServiceTest.java 2013-09-23 07:28:36 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/NoRegistrationSingleEventServiceTest.java 2013-09-23 07:29:58 +0000
@@ -54,8 +54,7 @@
import java.util.Date;
import java.util.HashSet;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.*;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -258,7 +257,11 @@
assertEquals( ImportStatus.SUCCESS, importSummary.getStatus() );
assertNotNull( importSummary.getReference() );
- assertEquals( 1, eventService.getEvents( programA, organisationUnitA ).getEvents().size() );
+ event = eventService.getEvent( importSummary.getReference() );
+ assertNotNull( event );
+ eventService.deleteEvent( event );
+ event = eventService.getEvent( importSummary.getReference() );
+ assertNull( event );
}
private Event createEvent( String program, String orgUnit )