119d172598eb1719d1e76e4ad5c6f0490a65ac6d
[vfc/nfvo/driver/sfc.git] / zte / sfc-driver / sfc-driver / src / test / java / org / onap / sfc / SfcDriverTest.java
1 /**
2  * Copyright 2018 ZTE Corporation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package org.onap.sfc;
17
18 import io.dropwizard.Application;
19 import io.dropwizard.setup.Bootstrap;
20 import io.dropwizard.setup.Environment;
21 import org.junit.Before;
22 import org.junit.Test;
23
24 public class SfcDriverTest {
25     SfcDriver sfcDriver;
26
27     @Before
28     public void setUp() throws Exception {
29         sfcDriver = new SfcDriver();
30     }
31
32     @Test
33     public void getName() throws Exception {
34         assert sfcDriver.getName() != null;
35     }
36
37     @Test
38     public void initialize() throws Exception {
39         Application<SfcDriverConfig> application = new Application<SfcDriverConfig>() {
40             @Override
41             public void run(SfcDriverConfig sfcDriverConfig, Environment environment) throws Exception {
42                 System.out.println("Hallo onap!");
43             }
44         };
45         Bootstrap<SfcDriverConfig> bootstrap = new Bootstrap<>(application);
46         sfcDriver.initialize(bootstrap);
47     }
48
49 }