diff options
author | Guangrong Fu <fu.guangrong@zte.com.cn> | 2017-10-14 16:38:26 +0800 |
---|---|---|
committer | Guangrong Fu <fu.guangrong@zte.com.cn> | 2017-10-14 17:38:54 +0800 |
commit | 530fcc3970550c2ddbe62f51c59b9705cbaa244b (patch) | |
tree | ad6b1be923651fb7952b692781ca5a77b116a39a /engine-d/src/test/java/org | |
parent | e540d3894d2f662a843e5c51535d44b876b9889f (diff) |
Add DMaaP Configuration APIs for Testing
Change-Id: I4f2d75ba8148f3118a731d0b2d68f13c6b941bb0
Issue-ID: HOLMES-59
Signed-off-by: Guangrong Fu <fu.guangrong@zte.com.cn>
Diffstat (limited to 'engine-d/src/test/java/org')
-rw-r--r-- | engine-d/src/test/java/org/onap/holmes/engine/EngineDActiveAppTest.java | 6 | ||||
-rw-r--r-- | engine-d/src/test/java/org/onap/holmes/engine/db/mapper/CorrelationRuleMapperTest.java | 57 |
2 files changed, 1 insertions, 62 deletions
diff --git a/engine-d/src/test/java/org/onap/holmes/engine/EngineDActiveAppTest.java b/engine-d/src/test/java/org/onap/holmes/engine/EngineDActiveAppTest.java index 362211b..2c6cdb7 100644 --- a/engine-d/src/test/java/org/onap/holmes/engine/EngineDActiveAppTest.java +++ b/engine-d/src/test/java/org/onap/holmes/engine/EngineDActiveAppTest.java @@ -15,13 +15,9 @@ */
package org.onap.holmes.engine;
-/**
- * Created by Administrator on 2017/2/20.
- */
-
public class EngineDActiveAppTest {
public static void main(String[] args) throws Exception {
- String filePath = "C:\\correlation-engine.yml";
+ String filePath = "C:\\engine-d.yml";
new EngineDActiveApp().run(new String[]{"server", filePath});
}
}
diff --git a/engine-d/src/test/java/org/onap/holmes/engine/db/mapper/CorrelationRuleMapperTest.java b/engine-d/src/test/java/org/onap/holmes/engine/db/mapper/CorrelationRuleMapperTest.java deleted file mode 100644 index acf62c6..0000000 --- a/engine-d/src/test/java/org/onap/holmes/engine/db/mapper/CorrelationRuleMapperTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/**
- * Copyright 2017 ZTE Corporation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.onap.holmes.engine.db.mapper;
-
-import org.junit.Test;
-import org.powermock.api.easymock.PowerMock;
-
-import java.sql.Date;
-import java.sql.ResultSet;
-import java.util.Properties;
-
-import static org.easymock.EasyMock.expect;
-
-public class CorrelationRuleMapperTest {
-
- @Test
- public void map() throws Exception {
- CorrelationRuleMapper mapper = new CorrelationRuleMapper();
- ResultSet resultSet = PowerMock.createMock(ResultSet.class);
-
- expect(resultSet.getString("name")).andReturn("");
- expect(resultSet.getString("rid")).andReturn("");
- expect(resultSet.getString("description")).andReturn("");
- expect(resultSet.getInt("enable")).andReturn(0);
- expect(resultSet.getInt("templateID")).andReturn(0);
- expect(resultSet.getString("engineID")).andReturn("");
- expect(resultSet.getString("engineType")).andReturn("");
- expect(resultSet.getString("creator")).andReturn("");
- expect(resultSet.getDate("createTime")).andReturn(new Date(System.currentTimeMillis()));
- expect(resultSet.getString("updator")).andReturn("");
- expect(resultSet.getDate("updateTime")).andReturn(new Date(System.currentTimeMillis()));
- expect(resultSet.getObject("params")).andReturn(new Properties());
- expect(resultSet.getString("content")).andReturn("");
- expect(resultSet.getString("vendor")).andReturn("");
- expect(resultSet.getString("package")).andReturn("");
-
- PowerMock.replayAll();
-
- mapper.map(0, resultSet, null);
-
- PowerMock.verify();
- }
-}
|