re base code
[sdc.git] / asdctool / src / test / java / org / openecomp / sdc / asdctool / main / SdcSchemaFileImportTest.java
1 package org.openecomp.sdc.asdctool.main;
2
3 import org.junit.Test;
4 import org.openecomp.sdc.asdctool.enums.SchemaZipFileEnum;
5
6 import java.nio.file.NoSuchFileException;
7
8 public class SdcSchemaFileImportTest {
9
10         private SdcSchemaFileImport createTestSubject() {
11                 return new SdcSchemaFileImport();
12         }
13
14         @Test(expected=NoSuchFileException.class)
15         public void testCreateAndSaveNodeSchemaFile() throws Exception {
16
17                 // default test
18                 SdcSchemaFileImport.createAndSaveNodeSchemaFile("");
19         }
20
21         @Test(expected=NoSuchFileException.class)
22         public void testCreateAndSaveNodeSchemaFileOnap() throws Exception {
23
24                 // default test
25                 SdcSchemaFileImport.createAndSaveNodeSchemaFile("onap");
26         }
27
28         @Test(expected=NullPointerException.class)
29         public void testCreateAndSaveSchemaFileYaml() throws Exception {
30                 SchemaZipFileEnum schemaZipFileEnum = null;
31                 Object content = null;
32
33                 // default test
34                 SdcSchemaFileImport.createAndSaveSchemaFileYaml(schemaZipFileEnum, content);
35         }
36
37         @Test(expected=IllegalArgumentException.class)
38         public void testCreateAndSaveSchemaFileYaml_1() throws Exception {
39                 String fileName = "";
40                 String[] importFileList = new String[] { "" };
41                 String collectionTitle = "";
42                 Object content = null;
43
44                 // default test
45                 SdcSchemaFileImport.createAndSaveSchemaFileYaml(fileName, importFileList, collectionTitle, content);
46         }
47 }