|
|
@ -50,13 +50,13 @@ public class ServiceNegativeTest extends BaseOperationTemplatePluginTest {
|
|
|
|
@Test(description = "This method tests Add Operation template under negative circumstances while missing " +
|
|
|
|
@Test(description = "This method tests Add Operation template under negative circumstances while missing " +
|
|
|
|
"required fields",
|
|
|
|
"required fields",
|
|
|
|
expectedExceptions = {OperationTemplateMgtPluginException.class},
|
|
|
|
expectedExceptions = {OperationTemplateMgtPluginException.class},
|
|
|
|
expectedExceptionsMessageRegExp = "Error occurred while processing insert operation template.")
|
|
|
|
expectedExceptionsMessageRegExp = "Invalid meter device subtype id: 0")
|
|
|
|
public void testAddOperationTemplates() throws OperationTemplateMgtPluginException {
|
|
|
|
public void testAddOperationTemplates() throws OperationTemplateMgtPluginException {
|
|
|
|
|
|
|
|
|
|
|
|
OperationTemplate operationTemplate = new OperationTemplate();
|
|
|
|
OperationTemplate operationTemplate = new OperationTemplate();
|
|
|
|
operationTemplate.setDeviceType(TestUtils.deviceType);
|
|
|
|
operationTemplate.setDeviceType(TestUtils.deviceType);
|
|
|
|
operationTemplate.setCode(TestUtils.operationCode);
|
|
|
|
operationTemplate.setCode(TestUtils.operationCode);
|
|
|
|
operationTemplate.setSubTypeId(1000);
|
|
|
|
operationTemplate.setSubTypeId(0);
|
|
|
|
operationTemplate.setOperationDefinition(TestUtils.getOperationDefinition(TestUtils.subtypeId, TestUtils.operationCode));
|
|
|
|
operationTemplate.setOperationDefinition(TestUtils.getOperationDefinition(TestUtils.subtypeId, TestUtils.operationCode));
|
|
|
|
operationTemplateService.addOperationTemplate(operationTemplate);
|
|
|
|
operationTemplateService.addOperationTemplate(operationTemplate);
|
|
|
|
}
|
|
|
|
}
|
|
|
|