1 package org.kuali.ole;
2
3 import org.kuali.ole.pojo.edi.MessageCreationInfoDetails;
4
5
6
7
8
9
10
11
12 public enum MessageCreationInfoDetailsFixture {
13 MessageCreationInformation("137",
14 "20111026",
15 "102"),;
16
17 private String messageCreationInfoConstant;
18 private String messageCreationInfoDate;
19 private String messageCreationInfoDateFormat;
20
21 private MessageCreationInfoDetailsFixture(String messageCreationInfoConstant, String messageCreationInfoDate,
22 String messageCreationInfoDateFormat) {
23 this.messageCreationInfoConstant = messageCreationInfoConstant;
24 this.messageCreationInfoDate = messageCreationInfoDate;
25 this.messageCreationInfoDateFormat = messageCreationInfoDateFormat;
26 }
27
28 public MessageCreationInfoDetails createMessageCreationInfoDetails(Class clazz) {
29 MessageCreationInfoDetails messageCreationInfoDetails = null;
30 try {
31 messageCreationInfoDetails = (MessageCreationInfoDetails) clazz.newInstance();
32 } catch (InstantiationException e) {
33 throw new RuntimeException("MessageCreationInfoDetails creation failed. class = " + clazz);
34 } catch (IllegalAccessException e) {
35 throw new RuntimeException("MessageCreationInfoDetails creation failed. class = " + clazz);
36 }
37 messageCreationInfoDetails.setMessageCreationInfoConstant(messageCreationInfoConstant);
38 messageCreationInfoDetails.setMessageCreationInfoDate(messageCreationInfoDate);
39 messageCreationInfoDetails.setMessageCreationInfoDateFormat(messageCreationInfoDateFormat);
40
41 return messageCreationInfoDetails;
42 }
43 }