1 package org.kuali.ole;
2
3
4
5
6
7
8
9
10
11 import org.kuali.ole.pojo.edi.BuyerInformation;
12
13 public enum BuyerInformationFixture {
14 BuyerInformation("DUL-WCS",
15 null,
16 "ZZ"
17 ),;
18
19 private String buyerCodeIdentification;
20 private String buyerPartyIdentificationCode;
21 private String buyerCodeListAgency;
22
23 private BuyerInformationFixture(String buyerCodeIdentification, String buyerPartyIdentificationCode,
24 String buyerCodeListAgency) {
25 this.buyerCodeIdentification = buyerCodeIdentification;
26 this.buyerPartyIdentificationCode = buyerPartyIdentificationCode;
27 this.buyerCodeListAgency = buyerCodeListAgency;
28 }
29
30 public BuyerInformation createBuyerInformation(Class clazz) {
31 BuyerInformation buyerInformation = null;
32 try {
33 buyerInformation = (BuyerInformation) clazz.newInstance();
34 } catch (InstantiationException e) {
35 throw new RuntimeException("BuyerInformation creation failed. class = " + clazz);
36 } catch (IllegalAccessException e) {
37 throw new RuntimeException("BuyerInformation creation failed. class = " + clazz);
38 }
39 buyerInformation.setBuyerCodeIdentification(buyerCodeIdentification);
40 buyerInformation.setBuyerPartyIdentificationCode(buyerPartyIdentificationCode);
41 buyerInformation.setBuyerCodeListAgency(buyerCodeListAgency);
42 return buyerInformation;
43 }
44
45 }