dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #11395
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3227: Improved test
------------------------------------------------------------
revno: 3227
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-03-31 09:09:01 +0200
message:
Improved test
modified:
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/user/UserStoreTest.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/user/UserStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/user/UserStoreTest.java 2010-04-21 19:45:12 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/user/UserStoreTest.java 2011-03-31 07:09:01 +0000
@@ -105,7 +105,7 @@
assertEquals( userStore.getUser( user.getId() ).getSurname(), "User1" );
assertEquals( userStore.getUser( user.getId() ).getFirstName(), userName );
assertEquals( 2, userStore.getUser( user.getId() ).getOrganisationUnits().size() );
- assertEquals( userStore.getUser( user.getId() ).getId(), 1 );
+ assertEquals( userStore.getUser( user.getId() ).getId(), id );
// Test getAllUsers
User user2 = new User();
@@ -118,11 +118,7 @@
userStore.addUser( user2 );
assertEquals( userStore.getAllUsers().size(), 2 );
- for ( int i = 1; i <= userStore.getAllUsers().size(); i++ )
- {
- // System.out.println( "User" + i );
- assertEquals( userStore.getUser( i ).getSurname(), "User" + i );
- }
+
assertEquals( 1, userStore.getUsersByOrganisationUnit( unit1 ).size() );
assertEquals( 2, userStore.getUsersByOrganisationUnit( unit2 ).size() );
assertEquals( 0, userStore.getUsersWithoutOrganisationUnit().size() );