manoj 10 years ago
commit ca4f902185

@ -1181,7 +1181,7 @@ public class PolicyDAOImpl implements PolicyDAO {
stmt.executeUpdate();
String locationPolicy = "DELETE FROM DM_LOCATION WHERE POLICY_ID = ?";
/*String locationPolicy = "DELETE FROM DM_LOCATION WHERE POLICY_ID = ?";
stmt = conn.prepareStatement(locationPolicy);
stmt.setInt(1, policyId);
stmt.executeUpdate();
@ -1196,7 +1196,7 @@ public class PolicyDAOImpl implements PolicyDAO {
String datePolicy = "DELETE FROM DM_DATE WHERE POLICY_ID = ?";
stmt = conn.prepareStatement(datePolicy);
stmt.setInt(1, policyId);
stmt.executeUpdate();
stmt.executeUpdate();*/
String deleteCriteria = "DELETE FROM DM_POLICY_CRITERIA WHERE POLICY_ID = ?";

@ -405,4 +405,13 @@ public class PolicyDAOTestCase {
}
@Test(dependsOnMethods = ("getRoleRelatedPolicyThirdTime"))
public void deletPolicy() throws PolicyManagementException {
PolicyAdministratorPoint policyAdministratorPoint = new PolicyAdministratorPointImpl();
policyAdministratorPoint.deletePolicy(1);
log.debug("First policy deleted.");
}
}

Loading…
Cancel
Save