File tree Expand file tree Collapse file tree 3 files changed +76
-0
lines changed
test/java/org/culturegraph/mf/morph/collectors Expand file tree Collapse file tree 3 files changed +76
-0
lines changed Original file line number Diff line number Diff line change 230
230
<attribute name =" flushWith" type =" string" use =" optional" />
231
231
<attribute name =" reset" type =" boolean" use =" optional"
232
232
default=" false" />
233
+ <attribute name =" sameEntity" type =" boolean" use =" optional" default =" false" />
233
234
</complexType >
234
235
</element >
235
236
268
269
default=" record" />
269
270
<attribute name =" reset" type =" boolean" use =" optional"
270
271
default=" false" />
272
+ <attribute name =" sameEntity" type =" boolean" use =" optional" default =" false" />
271
273
</complexType >
272
274
</element >
273
275
Original file line number Diff line number Diff line change 189
189
</result >
190
190
</test-case >
191
191
192
+ <test-case name =" should reset when entity changes if sameEntity" >
193
+ <input type =" text/x-cg+xml" >
194
+ <cgxml : cgxml version =" 1.0" >
195
+ <cgxml : records >
196
+ <cgxml : record id =" 1" >
197
+ <cgxml : entity name =" entity" >
198
+ <cgxml : literal name =" data2" value =" A" />
199
+ </cgxml : entity >
200
+ <cgxml : entity name =" entity" >
201
+ <cgxml : literal name =" data1" value =" A" />
202
+ </cgxml : entity >
203
+ </cgxml : record >
204
+ </cgxml : records >
205
+ </cgxml : cgxml >
206
+ </input >
207
+
208
+ <transformation type =" text/x-metamorph+xml" >
209
+ <mm : metamorph version =" 1" >
210
+ <mm : rules >
211
+ <mm : all sameEntity =" true" >
212
+ <mm : data source =" entity.data2" />
213
+ <mm : data source =" entity.data1" />
214
+ </mm : all >
215
+ </mm : rules >
216
+ </mm : metamorph >
217
+ </transformation >
218
+
219
+ <result type =" text/x-cg+xml" >
220
+ <cgxml : cgxml version =" 1.0" >
221
+ <cgxml : records >
222
+ <cgxml : record id =" 1" >
223
+ </cgxml : record >
224
+ </cgxml : records >
225
+ </cgxml : cgxml >
226
+ </result >
227
+ </test-case >
228
+
192
229
</metamorph-test >
Original file line number Diff line number Diff line change 154
154
</result >
155
155
</test-case >
156
156
157
+ <test-case name =" should reset when entity changes if sameEntity" >
158
+ <input type =" text/x-cg+xml" >
159
+ <cgxml : cgxml version =" 1.0" >
160
+ <cgxml : records >
161
+ <cgxml : record id =" 1" >
162
+ <cgxml : entity name =" entity" >
163
+ <cgxml : literal name =" data2" value =" A" />
164
+ </cgxml : entity >
165
+ <cgxml : entity name =" entity" >
166
+ <cgxml : literal name =" data1" value =" A" />
167
+ </cgxml : entity >
168
+ </cgxml : record >
169
+ </cgxml : records >
170
+ </cgxml : cgxml >
171
+ </input >
172
+
173
+ <transformation type =" text/x-metamorph+xml" >
174
+ <mm : metamorph version =" 1" >
175
+ <mm : rules >
176
+ <mm : none sameEntity =" true" >
177
+ <mm : data source =" entity.data2" />
178
+ </mm : none >
179
+ </mm : rules >
180
+ </mm : metamorph >
181
+ </transformation >
182
+
183
+ <result type =" text/x-cg+xml" >
184
+ <cgxml : cgxml version =" 1.0" >
185
+ <cgxml : records >
186
+ <cgxml : record id =" 1" >
187
+ <cgxml : literal name =" " value =" true" />
188
+ </cgxml : record >
189
+ </cgxml : records >
190
+ </cgxml : cgxml >
191
+ </result >
192
+ </test-case >
193
+
157
194
</metamorph-test >
You can’t perform that action at this time.
0 commit comments