1 package org.kuali.ole;
2
3 import org.kuali.ole.pojo.edi.SupplierInformation;
4
5
6
7
8
9
10
11
12 public enum SupplierInformationFixture {
13 SupplierInformation("HAR2",
14 null,
15 "ZZ"
16 ),;
17
18 private String supplierCodeIdentification;
19 private String supplierPartyIdentificationCode;
20 private String supplierCodeListAgency;
21
22 private SupplierInformationFixture(String supplierCodeIdentification, String supplierPartyIdentificationCode,
23 String supplierCodeListAgency) {
24 this.supplierCodeIdentification = supplierCodeIdentification;
25 this.supplierPartyIdentificationCode = supplierPartyIdentificationCode;
26 this.supplierCodeListAgency = supplierCodeListAgency;
27 }
28
29 public SupplierInformation createSupplierInformation(Class clazz) {
30 SupplierInformation supplierInformation = null;
31 try {
32 supplierInformation = (SupplierInformation) clazz.newInstance();
33 } catch (InstantiationException e) {
34 throw new RuntimeException("SupplierInformation creation failed. class = " + clazz);
35 } catch (IllegalAccessException e) {
36 throw new RuntimeException("SupplierInformation creation failed. class = " + clazz);
37 }
38 supplierInformation.setSupplierCodeIdentification(supplierCodeIdentification);
39 supplierInformation.setSupplierPartyIdentificationCode(supplierPartyIdentificationCode);
40 supplierInformation.setSupplierCodeListAgency(supplierCodeListAgency);
41 return supplierInformation;
42 }
43
44 }