diff options
author | FengLiang <feng.liang1@zte.com.cn> | 2017-02-24 15:27:04 +0800 |
---|---|---|
committer | FengLiang <feng.liang1@zte.com.cn> | 2017-02-24 15:46:32 +0800 |
commit | 2b4967270e624300f2890d604a6d1f013c084f10 (patch) | |
tree | dda9e7c0129f269c7621767a89d186307062f64a /engine-d/src/test/java/org | |
parent | fada906058895412557bdddf11c8850ff5ed4369 (diff) |
Remove DBException
Change-Id: I1eaadc6f893e98d0fe79769e21bcfea5f076b90c
Issue-ID: HOLMES-47
Signed-off-by: FengLiang <feng.liang1@zte.com.cn>
Diffstat (limited to 'engine-d/src/test/java/org')
-rw-r--r-- | engine-d/src/test/java/org/openo/holmes/engine/wrapper/RuleMgtWrapperTest.java | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/engine-d/src/test/java/org/openo/holmes/engine/wrapper/RuleMgtWrapperTest.java b/engine-d/src/test/java/org/openo/holmes/engine/wrapper/RuleMgtWrapperTest.java index 75c4a20..593b1ce 100644 --- a/engine-d/src/test/java/org/openo/holmes/engine/wrapper/RuleMgtWrapperTest.java +++ b/engine-d/src/test/java/org/openo/holmes/engine/wrapper/RuleMgtWrapperTest.java @@ -16,21 +16,22 @@ package org.openo.holmes.engine.wrapper;
+import static org.easymock.EasyMock.anyInt;
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.expect;
+
+import java.util.ArrayList;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.openo.holmes.common.api.entity.CorrelationRule;
-import org.openo.holmes.common.exception.DbException;
+import org.openo.holmes.common.exception.CorrelationException;
import org.openo.holmes.common.utils.DbDaoUtil;
import org.openo.holmes.engine.db.CorrelationRuleDao;
import org.powermock.api.easymock.PowerMock;
import org.powermock.reflect.Whitebox;
-import java.util.ArrayList;
-
-import static org.easymock.EasyMock.*;
-
public class RuleMgtWrapperTest {
@Rule
@@ -48,10 +49,10 @@ public class RuleMgtWrapperTest { }
@Test
- public void queryRuleByEnable_ruletemp_is_null() throws DbException {
+ public void queryRuleByEnable_ruletemp_is_null() throws CorrelationException {
int enable = 3;
- thrown.expect(DbException.class);
+ thrown.expect(CorrelationException.class);
CorrelationRuleDao correlationRuleDao = PowerMock.createMock(CorrelationRuleDao.class);
expect(daoUtil.getJdbiDaoByOnDemand(anyObject(Class.class))).andReturn(correlationRuleDao);
@@ -62,7 +63,7 @@ public class RuleMgtWrapperTest { }
@Test
- public void queryRuleByEnable_normal() throws DbException {
+ public void queryRuleByEnable_normal() throws CorrelationException {
int enable = 3;
CorrelationRuleDao correlationRuleDao = PowerMock.createMock(CorrelationRuleDao.class);
|