source: ccr/trunk/nhin-vista/projects/NHINC/Current/Product/Production/Common/NhincLib/test/gov/hhs/fha/nhinc/util/format/DocumentClassCodeBuilderTest.java@ 507

Last change on this file since 507 was 507, checked in by George Lilly, 15 years ago

NHIN gateway and adaptor for use on linux with VistA EHR and RPMS

File size: 1.8 KB
Line 
1/*
2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
4 */
5package gov.hhs.fha.nhinc.util.format;
6
7import gov.hhs.fha.nhinc.nhinclib.NullChecker;
8import java.util.*;
9import org.junit.AfterClass;
10import org.junit.BeforeClass;
11import org.junit.Test;
12import static org.junit.Assert.*;
13
14/**
15 *
16 * @author rayj
17 */
18public class DocumentClassCodeBuilderTest {
19
20 public DocumentClassCodeBuilderTest() {
21 }
22
23 @BeforeClass
24 public static void setUpClass() throws Exception {
25 }
26
27 @AfterClass
28 public static void tearDownClass() throws Exception {
29 }
30
31 @Test
32 public void BuildListWith3Items() {
33 List<String> documentClassCodeList = new ArrayList<String>();
34 documentClassCodeList.add("classcode1");
35 documentClassCodeList.add("classcode2");
36 documentClassCodeList.add("classcode3");
37 String classCodes = DocumentClassCodeParser.buildDocumentClassCodeItem(documentClassCodeList);
38 assertEquals("('classcode1','classcode2','classcode3')", classCodes);
39 }
40
41 @Test
42 public void BuildListWith1Item() {
43 List<String> documentClassCodeList = new ArrayList<String>();
44 documentClassCodeList.add("classcode1");
45 String classCodes = DocumentClassCodeParser.buildDocumentClassCodeItem(documentClassCodeList);
46 assertEquals("('classcode1')", classCodes);
47 }
48
49 @Test
50 public void BuildListWith0Items() {
51 List<String> documentClassCodeList = new ArrayList<String>();
52 String classCodes = DocumentClassCodeParser.buildDocumentClassCodeItem(documentClassCodeList);
53 assertEquals("", classCodes);
54 }
55
56 @Test
57 public void BuildListWithNullInput() {
58 String classCodes = DocumentClassCodeParser.buildDocumentClassCodeItem(null);
59 assertEquals("", classCodes);
60 }
61}
Note: See TracBrowser for help on using the repository browser.