------------------------------------------------------------ revno: 13723 committer: Lars Helge Ă˜verland <larshe...@gmail.com> branch nick: dhis2 timestamp: Tue 2014-01-14 12:58:21 +0100 message: Test fix modified: dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSetting.java dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/setting/SystemSettingStoreTest.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-api/src/main/java/org/hisp/dhis/setting/SystemSetting.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSetting.java 2013-10-01 16:44:42 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSetting.java 2014-01-14 11:58:21 +0000 @@ -48,7 +48,6 @@ public SystemSetting() { - } // ------------------------------------------------------------------------- === modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/setting/SystemSettingStoreTest.java' --- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/setting/SystemSettingStoreTest.java 2014-01-14 11:49:45 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/setting/SystemSettingStoreTest.java 2014-01-14 11:58:21 +0000 @@ -71,22 +71,22 @@ @Test public void testAddSystemSetting() { - systemSettingStore.save( settingA ); + int idA = systemSettingStore.save( settingA ); systemSettingStore.save( settingB ); systemSettingStore.save( settingC ); - SystemSetting s = systemSettingStore.getByName( settingA.getName() ); - assertNotNull( s ); - assertEquals( "Setting1", s.getName() ); - assertEquals( "Value1", s.getValue() ); + settingA = systemSettingStore.get( idA ); + assertNotNull( settingA ); + assertEquals( "Setting1", settingA.getName() ); + assertEquals( "Value1", settingA.getValue() ); settingA.setValue( new String( "Value1.1" ) ); - systemSettingStore.save( settingA ); + systemSettingStore.update( settingA ); - s = systemSettingStore.getByName( settingA.getName() ); - assertNotNull( s ); - assertEquals( "Setting1", s.getName() ); - assertEquals( "Value1.1", s.getValue() ); + settingA = systemSettingStore.get( idA ); + assertNotNull( settingA ); + assertEquals( "Setting1", settingA.getName() ); + assertEquals( "Value1.1", settingA.getValue() ); } @Test
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp