@@ -0,0 +1,1485 @@
+package com.savy3.testcobolserde;%0A%0Aimport com.savy3.cobolserde.CobolCopybook;%0A%0Aimport junit.framework.TestCase;%0A%0Apublic class testCobolCopybook extends TestCase %7B%0A%0A%09CobolCopybook ccb = new CobolCopybook(%0A%09%09%09%2201 WS-VAR. 05 WS-NAME PIC X(12). 01 ws-sudha. 05 WS-MARKS-LENGTH PIC 9(3). 05 WS-marks OCCURS 0 to 25 TIMES DEPENDING ON WS-MARKS-LENGTH. 10 WS-MARK PIC 999. 05 WS-NICKNAME PIC X(6)%22);%0A%0A%0A%0A%09public void testGetFieldNames() %7B%0A%09%09assertEquals(ccb.getFieldNames().get(0), %22ws_var%22);%0A%09%09ccb = new CobolCopybook(%2201 WS-NAME PIC X(12). 01 ws-sudha. 05 WS-MARKS-LENGTH PIC 9(3). 05 WS-marks OCCURS 0 to 25 TIMES DEPENDING ON WS-MARKS-LENGTH. 10 WS-MARK PIC 999. 05 WS-NICKNAME PIC X(6)%22);%0A%09%09 assertEquals(ccb.getFieldNames().get(1),%22ws_sudha%22);%0A%09%09// assertEquals(ccb.getFieldNames().get(2),%22ws_marks%22);%0A%09%09// assertEquals(ccb.getFieldNames().get(3),%22ws_nickname%22);%0A%0A%09%7D%0A%0A%09public void testGetFiledTypes() %7B%0A%09%09assertEquals(%0A%09%09%09%09ccb.getFieldTypes().get(0),%0A%09%09%09%09%22struct%3Cws_name:string%3E%22);%0A%09%09assertEquals(%0A%09%09%09%09ccb.getFieldTypes().get(1),%0A%09%09%09%09%22struct%3Cws_marks_length:smallint,ws_marks:array%3Cstruct%3Cws_mark:smallint%3E%3E,ws_nickname:string%3E%22);%0A%0A%09%7D%0A%09public void testGetFiledProperties() %7B%0A%09%09System.out.println(ccb.getFieldProperties().get(1).toString());%0A%09%09assertEquals(%0A%09%09%09%09ccb.getFieldProperties().get(0).toString(),%0A%09%09%09%09%22%5B%7Blength=0%7D, %7Blength=12%7D%5D%22);%0A%09%09assertEquals(%0A%09%09%09%09ccb.getFieldProperties().get(1).toString(),%0A%09%09%09%09%22%5B%7Blength=0%7D, %7Blength=3%7D, %7Blength=0, dcol=1%7D, %7Blength=3%7D, %7Blength=6%7D%5D%22);%0A%0A%09%7D%0A%0A%7D%0A

Create testCobolCopybook.java