Raise JUnit coverage asdctool
[sdc.git] / asdctool / src / test / java / org / openecomp / sdc / asdctool / migration / dao / MigrationTasksDaoTest.java
1 package org.openecomp.sdc.asdctool.migration.dao;
2
3 import java.math.BigInteger;
4
5 import org.junit.Test;
6 import org.openecomp.sdc.be.resources.data.MigrationTaskEntry;
7
8 public class MigrationTasksDaoTest {
9
10         private MigrationTasksDao createTestSubject() {
11                 return new MigrationTasksDao();
12         }
13
14         @Test(expected=NullPointerException.class)
15         public void testInit() throws Exception {
16                 MigrationTasksDao testSubject;
17
18                 // default test
19                 testSubject = createTestSubject();
20                 testSubject.init();
21         }
22
23         @Test(expected=NullPointerException.class)
24         public void testGetLatestMinorVersion() throws Exception {
25                 MigrationTasksDao testSubject;
26                 BigInteger majorVersion = null;
27                 BigInteger result;
28
29                 // default test
30                 testSubject = createTestSubject();
31                 result = testSubject.getLatestMinorVersion(majorVersion);
32         }
33
34         @Test(expected=NullPointerException.class)
35         public void testDeleteAllTasksForVersion() throws Exception {
36                 MigrationTasksDao testSubject;
37                 BigInteger majorVersion = null;
38
39                 // default test
40                 testSubject = createTestSubject();
41                 testSubject.deleteAllTasksForVersion(majorVersion);
42         }
43
44         @Test(expected=NullPointerException.class)
45         public void testCreateMigrationTask() throws Exception {
46                 MigrationTasksDao testSubject;
47                 MigrationTaskEntry migrationTask = null;
48
49                 // default test
50                 testSubject = createTestSubject();
51                 testSubject.createMigrationTask(migrationTask);
52         }
53 }