diff options
Diffstat (limited to 'rulemgt/src/test/java')
-rw-r--r-- | rulemgt/src/test/java/org/onap/holmes/rulemgt/db/mapper/CorrelationRuleMapperTest.java | 1 | ||||
-rw-r--r-- | rulemgt/src/test/java/org/onap/holmes/rulemgt/wrapper/RuleMgtWrapperTest.java | 10 |
2 files changed, 8 insertions, 3 deletions
diff --git a/rulemgt/src/test/java/org/onap/holmes/rulemgt/db/mapper/CorrelationRuleMapperTest.java b/rulemgt/src/test/java/org/onap/holmes/rulemgt/db/mapper/CorrelationRuleMapperTest.java index bcf56ca..3939994 100644 --- a/rulemgt/src/test/java/org/onap/holmes/rulemgt/db/mapper/CorrelationRuleMapperTest.java +++ b/rulemgt/src/test/java/org/onap/holmes/rulemgt/db/mapper/CorrelationRuleMapperTest.java @@ -45,6 +45,7 @@ public class CorrelationRuleMapperTest { expect(resultSet.getString("content")).andReturn("");
expect(resultSet.getString("vendor")).andReturn("");
expect(resultSet.getString("package")).andReturn("");
+ expect(resultSet.getString("ctrlloop")).andReturn("");
PowerMock.replay(resultSet);
mapper.map(0, resultSet, null);
PowerMock.verify(resultSet);
diff --git a/rulemgt/src/test/java/org/onap/holmes/rulemgt/wrapper/RuleMgtWrapperTest.java b/rulemgt/src/test/java/org/onap/holmes/rulemgt/wrapper/RuleMgtWrapperTest.java index 9837fc5..d448e40 100644 --- a/rulemgt/src/test/java/org/onap/holmes/rulemgt/wrapper/RuleMgtWrapperTest.java +++ b/rulemgt/src/test/java/org/onap/holmes/rulemgt/wrapper/RuleMgtWrapperTest.java @@ -197,7 +197,8 @@ public class RuleMgtWrapperTest { oldCorrelationRule.setContent("content");
oldCorrelationRule.setPackageName("testName");
oldCorrelationRule.setEnabled(1);
- RuleUpdateRequest ruleUpdateRequest = createRuleUpdateRequest("rule_1", "des2", "contetnt2", 1);
+ oldCorrelationRule.setClosedControlLoopName("cl-name");
+ RuleUpdateRequest ruleUpdateRequest = createRuleUpdateRequest("rule_1", "cl-name", "des2", "contetnt2", 1);
EasyMock.expect(correlationRuleDaoMock.queryRuleByRid("rule_1")).andReturn(oldCorrelationRule);
EasyMock.expect(engineWrapperMock.deleteRuleFromEngine("testName")).andReturn(true);
@@ -225,7 +226,8 @@ public class RuleMgtWrapperTest { oldCorrelationRule.setContent("content");
oldCorrelationRule.setPackageName("testName");
oldCorrelationRule.setEnabled(1);
- RuleUpdateRequest ruleUpdateRequest = createRuleUpdateRequest("rule_1", "des1", "content", 1);
+ oldCorrelationRule.setClosedControlLoopName("cl-name");
+ RuleUpdateRequest ruleUpdateRequest = createRuleUpdateRequest("rule_1", "cl-name", "des1", "content", 1);
EasyMock.expect(correlationRuleDaoMock.queryRuleByRid("rule_1")).andReturn(oldCorrelationRule);
@@ -373,12 +375,14 @@ public class RuleMgtWrapperTest { return rcr;
}
- private RuleUpdateRequest createRuleUpdateRequest(String ruleId, String description, String content, int enabled) {
+ private RuleUpdateRequest createRuleUpdateRequest(String ruleId, String clName, String description,
+ String content, int enabled) {
RuleUpdateRequest ruleUpdateRequest = new RuleUpdateRequest();
ruleUpdateRequest.setRuleId(ruleId);
ruleUpdateRequest.setDescription(description);
ruleUpdateRequest.setContent(content);
ruleUpdateRequest.setEnabled(enabled);
+ ruleUpdateRequest.setLoopControlName(clName);
return ruleUpdateRequest;
}
|