1 package org.kuali.ole;
2
3 import org.junit.Test;
4 import org.kuali.ole.pojo.ProfileAttribute;
5 import org.slf4j.Logger;
6 import org.slf4j.LoggerFactory;
7
8 import java.util.Arrays;
9
10 import static junit.framework.Assert.assertNotNull;
11
12
13
14
15
16
17
18
19 public class OleHoldingsRecordHandler_UT {
20 public static final Logger LOG = LoggerFactory.getLogger(OleHoldingsRecordHandler_UT.class);
21
22 @Test
23 public void testGenerateInstanceXML() throws Exception {
24 OleHoldingsRecordHandler oleHoldingsRecordHandler = new OleHoldingsRecordHandler();
25 ProfileAttribute attr1 = new ProfileAttribute();
26 attr1.setAgendaName("mockAgenda");
27 attr1.setAttributeName("encodingLevel");
28 attr1.setAttributeValue("1");
29 ProfileAttribute attr2 = new ProfileAttribute();
30
31 attr2.setSystemValue(null);
32 if (attr2.getSystemValue() != null) {
33 LOG.info(attr2.getSystemValue());
34 }
35 attr2.setId(null);
36 if (attr2.getId() != null) {
37 LOG.info(attr2.getId().toString());
38 }
39 attr2.setAgendaName("mockAgenda");
40 if (attr2.getAgendaName() != null) {
41 LOG.info(attr2.getAgendaName());
42 }
43 attr2.setAttributeName("recordType");
44 attr2.setAttributeValue("u");
45 if (attr2.getAttributeValue() != null) {
46 LOG.info(attr2.getAttributeValue());
47 }
48
49 String xml = oleHoldingsRecordHandler.generateXML(Arrays.asList(attr1, attr2));
50 assertNotNull(xml);
51 LOG.info(xml);
52
53
54 }
55
56 }