1 | /*
|
---|
2 | * To change this template, choose Tools | Templates
|
---|
3 | * and open the template in the editor.
|
---|
4 | */
|
---|
5 | package gov.hhs.fha.nhinc.common.connectionmanager.dao;
|
---|
6 |
|
---|
7 | import java.util.List;
|
---|
8 | import org.junit.After;
|
---|
9 | import org.junit.AfterClass;
|
---|
10 | import org.junit.Before;
|
---|
11 | import org.junit.BeforeClass;
|
---|
12 | import org.junit.Test;
|
---|
13 | import static org.junit.Assert.*;
|
---|
14 |
|
---|
15 | /**
|
---|
16 | *
|
---|
17 | * @author svalluripalli
|
---|
18 | */
|
---|
19 | public class AssigningAuthorityHomeCommunityDAOTest {
|
---|
20 |
|
---|
21 | public AssigningAuthorityHomeCommunityDAOTest() {
|
---|
22 | }
|
---|
23 |
|
---|
24 | @BeforeClass
|
---|
25 | public static void setUpClass() throws Exception {
|
---|
26 | }
|
---|
27 |
|
---|
28 | @AfterClass
|
---|
29 | public static void tearDownClass() throws Exception {
|
---|
30 | }
|
---|
31 |
|
---|
32 | @Before
|
---|
33 | public void setUp() {
|
---|
34 | }
|
---|
35 |
|
---|
36 | @After
|
---|
37 | public void tearDown() {
|
---|
38 | }
|
---|
39 |
|
---|
40 | @Test
|
---|
41 | public void testStoreMapping() {
|
---|
42 | AssigningAuthorityHomeCommunityMappingDAO aDao = new AssigningAuthorityHomeCommunityMappingDAO();
|
---|
43 | //assertTrue(aDao.storeMapping("1.2.3.4.55.500", "1.6"));
|
---|
44 | }
|
---|
45 |
|
---|
46 | @Test
|
---|
47 | public void testGetHomeCommunity() {
|
---|
48 | AssigningAuthorityHomeCommunityMappingDAO aDao = new AssigningAuthorityHomeCommunityMappingDAO();
|
---|
49 | assertNotNull(aDao.getHomeCommunityId("1.1"));
|
---|
50 | }
|
---|
51 |
|
---|
52 | @Test
|
---|
53 | public void testGetAssigningAuthority() {
|
---|
54 | AssigningAuthorityHomeCommunityMappingDAO aDao = new AssigningAuthorityHomeCommunityMappingDAO();
|
---|
55 | assertNotNull(aDao.getAssigningAuthority("1.2.3.4.55.500"));
|
---|
56 | }
|
---|
57 |
|
---|
58 | @Test
|
---|
59 | public void testGetAssigningAuthoritiesByHomeCommunity()
|
---|
60 | {
|
---|
61 | AssigningAuthorityHomeCommunityMappingDAO aDao = new AssigningAuthorityHomeCommunityMappingDAO();
|
---|
62 | List<String> aaList = aDao.getAssigningAuthoritiesByHomeCommunity("1.2.3.4.55.500");
|
---|
63 | assertNotNull(aaList);
|
---|
64 | // for(String a : aaList)
|
---|
65 | // System.out.println("AA := "+a);
|
---|
66 | // assertTrue(aaList.size() == 2);
|
---|
67 | }
|
---|
68 | }
|
---|