dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #36982
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18920: Fix conflict between DataApprovalServiceTest and DataApprovalServiceCategoryOptionGroupTest
------------------------------------------------------------
revno: 18920
committer: jimgrace@xxxxxxxxx
branch nick: dhis2
timestamp: Wed 2015-04-15 20:11:41 -0400
message:
Fix conflict between DataApprovalServiceTest and DataApprovalServiceCategoryOptionGroupTest
modified:
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataapproval/DataApprovalServiceCategoryOptionGroupTest.java
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataapproval/DataApprovalServiceTest.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/dataapproval/DataApprovalServiceCategoryOptionGroupTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataapproval/DataApprovalServiceCategoryOptionGroupTest.java 2015-04-15 20:33:34 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataapproval/DataApprovalServiceCategoryOptionGroupTest.java 2015-04-16 00:11:41 +0000
@@ -130,6 +130,9 @@
protected UserService _userService;
@Autowired
+ protected CurrentUserService currentUserService;
+
+ @Autowired
private JdbcTemplate jdbcTemplate;
// -------------------------------------------------------------------------
@@ -500,6 +503,16 @@
return true;
}
+ @Override
+ public void tearDownTest()
+ {
+ setDependency( dataApprovalService, "currentUserService", currentUserService, CurrentUserService.class );
+ setDependency( dataApprovalStore, "currentUserService", currentUserService, CurrentUserService.class );
+ setDependency( dataApprovalLevelService, "currentUserService", currentUserService, CurrentUserService.class );
+ setDependency( organisationUnitService, "currentUserService", currentUserService, CurrentUserService.class );
+ setDependency( hibernateCategoryOptionGroupStore, "currentUserService", currentUserService, CurrentUserService.class );
+ }
+
// -------------------------------------------------------------------------
// Test helper methods
// -------------------------------------------------------------------------
@@ -719,7 +732,6 @@
// Tests
// -------------------------------------------------------------------------
- //@Ignore // TODO: Enabling this test causes DataApprovalServiceTest to fail. Determine why and Fix.
@Test
public void test()
{
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataapproval/DataApprovalServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataapproval/DataApprovalServiceTest.java 2015-04-15 20:26:30 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataapproval/DataApprovalServiceTest.java 2015-04-16 00:11:41 +0000
@@ -105,6 +105,9 @@
protected UserService _userService;
@Autowired
+ protected CurrentUserService currentUserService;
+
+ @Autowired
private JdbcTemplate jdbcTemplate;
// -------------------------------------------------------------------------
@@ -309,6 +312,14 @@
return true;
}
+ @Override
+ public void tearDownTest()
+ {
+ setDependency( dataApprovalService, "currentUserService", currentUserService, CurrentUserService.class );
+ setDependency( dataApprovalLevelService, "currentUserService", currentUserService, CurrentUserService.class );
+ setDependency( organisationUnitService, "currentUserService", currentUserService, CurrentUserService.class );
+ }
+
// ---------------------------------------------------------------------
// Set Up Categories
// ---------------------------------------------------------------------