TCA: Support for VES/A&AI enrichment
[dcaegen2/analytics/tca.git] / dcae-analytics-cdap-tca / src / test / java / org / openecomp / dcae / apod / analytics / cdap / tca / TCAAnalyticsApplicationTest.java
1 /*\r
2  * ===============================LICENSE_START======================================\r
3  *  dcae-analytics\r
4  * ================================================================================\r
5  *    Copyright © 2017 AT&T Intellectual Property. All rights reserved.\r
6  * ================================================================================\r
7  *  Licensed under the Apache License, Version 2.0 (the "License");\r
8  *  you may not use this file except in compliance with the License.\r
9  *   You may obtain a copy of the License at\r
10  *\r
11  *          http://www.apache.org/licenses/LICENSE-2.0\r
12  *\r
13  *  Unless required by applicable law or agreed to in writing, software\r
14  *  distributed under the License is distributed on an "AS IS" BASIS,\r
15  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16  *  See the License for the specific language governing permissions and\r
17  *  limitations under the License.\r
18  *  ============================LICENSE_END===========================================\r
19  */\r
20 \r
21 package org.openecomp.dcae.apod.analytics.cdap.tca;\r
22 \r
23 import co.cask.cdap.app.DefaultApplicationContext;\r
24 import co.cask.cdap.app.MockAppConfigurer;\r
25 import org.junit.Test;\r
26 import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCAAppConfig;\r
27 \r
28 import static org.hamcrest.CoreMatchers.is;\r
29 import static org.junit.Assert.assertThat;\r
30 \r
31 /**\r
32  * @author Rajiv Singla . Creation Date: 1/12/2017.\r
33  */\r
34 public class TCAAnalyticsApplicationTest extends BaseAnalyticsCDAPTCAUnitTest {\r
35 \r
36     @Test\r
37     public void testConfigure() throws Exception {\r
38         final TCAAnalyticsApplication tcaAnalyticsApplication = new TCAAnalyticsApplication();\r
39         MockAppConfigurer mockAppConfigurer = new MockAppConfigurer(tcaAnalyticsApplication);\r
40         final DefaultApplicationContext<TCAAppConfig> applicationContext =\r
41                 new DefaultApplicationContext<TCAAppConfig>(getTCATestAppConfig());\r
42         tcaAnalyticsApplication.configure(mockAppConfigurer, applicationContext);\r
43         assertThat(TCA_TEST_APP_CONFIG_NAME, is(mockAppConfigurer.getName()));\r
44     }\r
45 \r
46 \r
47 }\r