1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.sampleu.demo.kitchensink;
17
18 import java.io.Serializable;
19 import java.util.ArrayList;
20 import java.util.Arrays;
21 import java.util.HashMap;
22 import java.util.List;
23 import java.util.Map;
24 import java.util.Random;
25
26
27
28
29
30
31 public class UITestObject implements Serializable {
32 private static final long serialVersionUID = -7525378097732916411L;
33
34 private String field1;
35 private String field2;
36 private String field3;
37 private String field4;
38 private boolean bfield;
39 private boolean bfield2;
40 private List<String> stringList = Arrays.asList("String1", "String2", "String3");
41
42 private UITestObject innerObject;
43
44 private Map<String, Object> remoteFieldValuesMap;
45
46 private List<UITestObject> subList = new ArrayList<UITestObject>();
47
48 public UITestObject() {
49 remoteFieldValuesMap = new HashMap<String, Object>();
50 remoteFieldValuesMap.put("remoteField1", "Apple");
51 remoteFieldValuesMap.put("remoteField2", "Banana");
52 remoteFieldValuesMap.put("remoteField3", true);
53 remoteFieldValuesMap.put("remoteField4", "Fruit");
54 Random r = new Random();
55 bfield2 = r.nextBoolean();
56 }
57
58 public UITestObject(String field1, String field2, String field3, String field4) {
59 this.field1 = field1;
60 this.field2 = field2;
61 this.field3 = field3;
62 this.field4 = field4;
63
64 Random r = new Random();
65 bfield2 = r.nextBoolean();
66
67 remoteFieldValuesMap = new HashMap<String, Object>();
68 remoteFieldValuesMap.put("remoteField1", "Apple");
69 remoteFieldValuesMap.put("remoteField2", "Banana");
70 remoteFieldValuesMap.put("remoteField3", true);
71 remoteFieldValuesMap.put("remoteField4", "Fruit");
72
73 }
74
75 public UITestObject(String field1, String field2, String field3, String field4, UITestObject innerObject) {
76 this(field1,field2,field3,field4);
77
78 this.innerObject = innerObject;
79 }
80
81
82
83
84 public String getField1() {
85 return this.field1;
86 }
87
88
89
90
91 public void setField1(String field1) {
92 this.field1 = field1;
93 }
94
95
96
97
98 public String getField2() {
99 return this.field2;
100 }
101
102
103
104
105 public void setField2(String field2) {
106 this.field2 = field2;
107 }
108
109
110
111
112 public String getField3() {
113 return this.field3;
114 }
115
116
117
118
119 public void setField3(String field3) {
120 this.field3 = field3;
121 }
122
123
124
125
126 public String getField4() {
127 return this.field4;
128 }
129
130
131
132
133 public void setField4(String field4) {
134 this.field4 = field4;
135 }
136
137
138
139
140 public void setSubList(List<UITestObject> subList) {
141 this.subList = subList;
142 }
143
144
145
146
147 public List<UITestObject> getSubList() {
148 return subList;
149 }
150
151 public Map<String, Object> getRemoteFieldValuesMap() {
152 return remoteFieldValuesMap;
153 }
154
155 public void setRemoteFieldValuesMap(Map<String, Object> remoteFieldValuesMap) {
156 this.remoteFieldValuesMap = remoteFieldValuesMap;
157 }
158
159
160
161
162
163
164 public boolean isBfield() {
165 return bfield;
166 }
167
168
169
170
171 public void setBfield(boolean bfield) {
172 this.bfield = bfield;
173 }
174
175 public boolean isBfield2() {
176 return bfield2;
177 }
178
179 public void setBfield2(boolean bfield2) {
180 this.bfield2 = bfield2;
181 }
182
183 @Override
184 public String toString() {
185
186 return "" + field1 + field2 + field3 + field4;
187 }
188
189 public List<String> getStringList() {
190 return stringList;
191 }
192
193 public void setStringList(List<String> stringList) {
194 this.stringList = stringList;
195 }
196
197 public UITestObject getInnerObject() {
198 return innerObject;
199 }
200
201 public void setInnerObject(UITestObject innerObject) {
202 this.innerObject = innerObject;
203 }
204 }