+++ /dev/null
-/**\r
- * Copyright 2017 ZTE Corporation.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.onap.holmes.engine;\r
-\r
-import io.dropwizard.db.DataSourceFactory;\r
-import org.hamcrest.core.IsEqual;\r
-import org.hamcrest.core.IsNull;\r
-import org.junit.Assert;\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.powermock.api.easymock.PowerMock;\r
-\r
-public class EnginedAppConfigTest {\r
-\r
- private EngineDAppConfig engineAppConfig;\r
-\r
- @Before\r
- public void setUp() {\r
- engineAppConfig = new EngineDAppConfig();\r
- }\r
-\r
- @Test\r
- public void getDataSourceFactory() {\r
- Assert.assertThat(engineAppConfig.getDataSourceFactory(), IsNull.<DataSourceFactory>notNullValue());\r
- }\r
-\r
- @Test\r
- public void setDataSourceFactory() {\r
- DataSourceFactory database = new DataSourceFactory();\r
- engineAppConfig.setDataSourceFactory(database);\r
- Assert.assertThat(engineAppConfig.getDataSourceFactory(), IsEqual.equalTo(database));\r
- }\r
-\r
- @Test\r
- public void getApidescription() {\r
- final String apidescription = "Holmes rule management rest API";\r
- Assert.assertThat(engineAppConfig.getApidescription(), IsEqual.equalTo(apidescription));\r
- }\r
-\r
- @Test\r
- public void setApidescription() {\r
- final String apidescription = "set api description";\r
- engineAppConfig.setApidescription(apidescription);\r
- Assert.assertThat(engineAppConfig.getApidescription(), IsEqual.equalTo(apidescription));\r
- }\r
-}\r