summaryrefslogtreecommitdiffstats
path: root/rulemgt/src/test/java/org/openo/holmes/rulemgt/RuleAppConfigTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'rulemgt/src/test/java/org/openo/holmes/rulemgt/RuleAppConfigTest.java')
-rw-r--r--rulemgt/src/test/java/org/openo/holmes/rulemgt/RuleAppConfigTest.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/rulemgt/src/test/java/org/openo/holmes/rulemgt/RuleAppConfigTest.java b/rulemgt/src/test/java/org/openo/holmes/rulemgt/RuleAppConfigTest.java
index 996f80e..e451410 100644
--- a/rulemgt/src/test/java/org/openo/holmes/rulemgt/RuleAppConfigTest.java
+++ b/rulemgt/src/test/java/org/openo/holmes/rulemgt/RuleAppConfigTest.java
@@ -22,34 +22,45 @@ import static org.junit.Assert.assertThat;
import io.dropwizard.db.DataSourceFactory;
import org.junit.Before;
+import org.junit.Test;
public class RuleAppConfigTest {
private RuleAppConfig ruleAppConfig;
@Before
- public void setUp(){
+ public void setUp() {
ruleAppConfig = new RuleAppConfig();
}
+ @Test
public void getDataSourceFactory() throws Exception {
assertThat(ruleAppConfig.getDataSourceFactory(), notNullValue());
}
+ @Test
public void setDataSourceFactory() throws Exception {
final DataSourceFactory factory = new DataSourceFactory();
ruleAppConfig.setDataSourceFactory(factory);
assertThat(ruleAppConfig.getDataSourceFactory(), equalTo(factory));
}
+ @Test
public void getApidescription() throws Exception {
assertThat(ruleAppConfig.getApidescription(), equalTo("Holmes rule management rest API"));
}
+ @Test
public void setApidescription() throws Exception {
final String value = "desc";
ruleAppConfig.setApidescription(value);
assertThat(ruleAppConfig.getApidescription(), equalTo(value));
}
+ @Test
+ public void getterAndSetter4MsbServerAddr() throws Exception {
+ final String value = "msbServerAddr";
+ ruleAppConfig.setMsbServerAddr(value);
+ assertThat(ruleAppConfig.getMsbServerAddr(), equalTo(value));
+ }
} \ No newline at end of file