1 package org.kuali.ole;
2
3
4
5
6
7
8
9
10 import org.kuali.ole.pojo.edi.PartyDetails;
11
12 public enum PartyDetailsFixture {
13 PartyDetails("API",
14 "DUL-WCS"
15 ),;
16
17 private String additionalPartyIdentification;
18 private String partyName;
19
20 private PartyDetailsFixture(String additionalPartyIdentification,String partyName){
21 this.additionalPartyIdentification = additionalPartyIdentification;
22 this.partyName = partyName;
23 }
24
25 public PartyDetails createPartyDetails(Class clazz){
26 PartyDetails partyDetails = null;
27 try{
28 partyDetails = (PartyDetails)clazz.newInstance();
29 }catch (InstantiationException e){
30 throw new RuntimeException("PartyDetails creation failed. class = " + clazz);
31 } catch (IllegalAccessException e) {
32 throw new RuntimeException("PartyDetails creation failed. class = " + clazz);
33 }
34 partyDetails.setAdditionalPartyIdentification(additionalPartyIdentification);
35 partyDetails.setPartyName(partyName);
36
37 return partyDetails;
38 }
39 }