dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #33207
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16942: Made tests extend DhisSpringTest
------------------------------------------------------------
revno: 16942
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-10-03 08:28:50 +0200
message:
Made tests extend DhisSpringTest
modified:
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/datavalue/DataValueAuditServiceTest.java
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/datavalue/DataValueDimensionTest.java
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/i18n/I18nServiceTest.java
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/option/OptionServiceTest.java
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/validation/ValidationRuleServiceTest.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/datavalue/DataValueAuditServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/datavalue/DataValueAuditServiceTest.java 2014-07-18 11:51:12 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/datavalue/DataValueAuditServiceTest.java 2014-10-03 06:28:50 +0000
@@ -28,7 +28,15 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import org.hisp.dhis.DhisTest;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Collection;
+import java.util.Date;
+
+import org.hisp.dhis.DhisSpringTest;
import org.hisp.dhis.common.AuditType;
import org.hisp.dhis.dataelement.DataElement;
import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
@@ -40,19 +48,11 @@
import org.hisp.dhis.period.PeriodService;
import org.junit.Test;
-import java.util.Collection;
-import java.util.Date;
-
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-
/**
* Created by Halvdan Hoem Grelland
*/
public class DataValueAuditServiceTest
- extends DhisTest
+ extends DhisSpringTest
{
// -------------------------------------------------------------------------
// Supporting data
@@ -160,12 +160,6 @@
dataValueService.addDataValue( dataValueD );
}
- @Override
- public boolean emptyDatabaseAfterTest()
- {
- return true;
- }
-
// -------------------------------------------------------------------------
// Basic DataValueAudit
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/datavalue/DataValueDimensionTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/datavalue/DataValueDimensionTest.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/datavalue/DataValueDimensionTest.java 2014-10-03 06:28:50 +0000
@@ -37,7 +37,7 @@
import java.util.Collection;
import org.apache.commons.collections.CollectionUtils;
-import org.hisp.dhis.DhisTest;
+import org.hisp.dhis.DhisSpringTest;
import org.hisp.dhis.dataelement.DataElement;
import org.hisp.dhis.dataelement.DataElementCategory;
import org.hisp.dhis.dataelement.DataElementCategoryCombo;
@@ -55,7 +55,7 @@
* @author Lars Helge Overland
*/
public class DataValueDimensionTest
- extends DhisTest
+ extends DhisSpringTest
{
private DataElementCategoryOption male;
private DataElementCategoryOption female;
@@ -133,13 +133,7 @@
dataValueService.addDataValue( createDataValue( dataElementA, periodA, sourceA, "10", categoryOptionCombo, defaultOptionCombo ) );
}
}
-
- @Override
- public boolean emptyDatabaseAfterTest()
- {
- return true;
- }
-
+
@Test
public void testGetDimensions()
{
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/i18n/I18nServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/i18n/I18nServiceTest.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/i18n/I18nServiceTest.java 2014-10-03 06:28:50 +0000
@@ -39,7 +39,7 @@
import java.util.Locale;
import java.util.Map;
-import org.hisp.dhis.DhisTest;
+import org.hisp.dhis.DhisSpringTest;
import org.hisp.dhis.dataelement.DataElement;
import org.hisp.dhis.dataelement.DataElementService;
import org.junit.Before;
@@ -49,7 +49,7 @@
* @author Lars Helge Overland
*/
public class I18nServiceTest
- extends DhisTest
+ extends DhisSpringTest
{
private I18nService i18nService;
@@ -65,12 +65,6 @@
dataElementService = (DataElementService) getBean( DataElementService.ID );
}
-
- @Override
- public boolean emptyDatabaseAfterTest()
- {
- return true;
- }
// -------------------------------------------------------------------------
// Tests
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/option/OptionServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/option/OptionServiceTest.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/option/OptionServiceTest.java 2014-10-03 06:28:50 +0000
@@ -34,14 +34,14 @@
import java.util.ArrayList;
import java.util.List;
-import org.hisp.dhis.DhisTest;
+import org.hisp.dhis.DhisSpringTest;
import org.junit.Test;
/**
* @author Lars Helge Overland
*/
public class OptionServiceTest
- extends DhisTest
+ extends DhisSpringTest
{
private OptionService optionService;
@@ -77,12 +77,6 @@
optionSetB.setOptions( options );
}
- @Override
- public boolean emptyDatabaseAfterTest()
- {
- return true;
- }
-
@Test
public void testSaveGet()
{
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/validation/ValidationRuleServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/validation/ValidationRuleServiceTest.java 2014-08-26 10:51:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/validation/ValidationRuleServiceTest.java 2014-10-03 06:28:50 +0000
@@ -75,7 +75,6 @@
/**
* @author Lars Helge Overland
* @author Jim Grace
- * @version $Id$
*/
public class ValidationRuleServiceTest
extends DhisTest
@@ -443,9 +442,9 @@
{
return true;
}
-
+
// -------------------------------------------------------------------------
- // Local convenience routines
+ // Local convenience methods
// -------------------------------------------------------------------------
/**