Skip to content

Package: EMFFormsIndexDMRExpander_Test

EMFFormsIndexDMRExpander_Test

nameinstructionbranchcomplexitylinemethod
EMFFormsIndexDMRExpander_Test()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
setUp()
M: 0 C: 36
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 8
100%
M: 0 C: 1
100%
testIsApplicable()
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
testIsApplicableNull()
M: 0 C: 17
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
testIsApplicableWrongReferenceType()
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
testPrepareDomainObjectBothNull()
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
testPrepareDomainObjectNoListWithPrefixDMR()
M: 6 C: 61
91%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 2 C: 16
89%
M: 0 C: 1
100%
testPrepareDomainObjectNoListWithoutPrefixDMR()
M: 6 C: 55
90%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 2 C: 13
87%
M: 0 C: 1
100%
testPrepareDomainObjectObjectNull()
M: 8 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
testPrepareDomainObjectReferenceNull()
M: 8 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
testPrepareDomainObjectWithPrefixDMRIndex0()
M: 2 C: 87
98%
M: 2 C: 2
50%
M: 2 C: 1
33%
M: 0 C: 21
100%
M: 0 C: 1
100%
testPrepareDomainObjectWithPrefixDMRIndex1()
M: 1 C: 85
99%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 0 C: 21
100%
M: 0 C: 1
100%
testPrepareDomainObjectWithoutPrefixDMRIndex0()
M: 2 C: 81
98%
M: 2 C: 2
50%
M: 2 C: 1
33%
M: 0 C: 18
100%
M: 0 C: 1
100%
testPrepareDomainObjectWithoutPrefixDMRIndex1()
M: 2 C: 86
98%
M: 2 C: 2
50%
M: 2 C: 1
33%
M: 0 C: 19
100%
M: 0 C: 1
100%
testPrepareDomainObjectWrongReferenceType()
M: 10 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2016 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Lucas Koehler - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emfforms.internal.core.services.domainexpander.index;
15:
16: import static org.junit.Assert.assertEquals;
17: import static org.junit.Assert.assertNotNull;
18: import static org.junit.Assert.assertTrue;
19: import static org.mockito.Matchers.any;
20: import static org.mockito.Matchers.same;
21: import static org.mockito.Mockito.mock;
22: import static org.mockito.Mockito.verify;
23: import static org.mockito.Mockito.when;
24:
25: import org.eclipse.core.databinding.property.value.IValueProperty;
26: import org.eclipse.emf.ecore.EObject;
27: import org.eclipse.emf.ecp.view.spi.indexdmr.model.VIndexDomainModelReference;
28: import org.eclipse.emf.ecp.view.spi.indexdmr.model.VIndexdmrFactory;
29: import org.eclipse.emf.ecp.view.spi.model.VDomainModelReference;
30: import org.eclipse.emf.ecp.view.spi.model.VFeaturePathDomainModelReference;
31: import org.eclipse.emf.ecp.view.spi.model.VViewFactory;
32: import org.eclipse.emfforms.core.services.databinding.testmodel.test.model.B;
33: import org.eclipse.emfforms.core.services.databinding.testmodel.test.model.TestFactory;
34: import org.eclipse.emfforms.core.services.databinding.testmodel.test.model.TestPackage;
35: import org.eclipse.emfforms.spi.common.report.AbstractReport;
36: import org.eclipse.emfforms.spi.common.report.ReportService;
37: import org.eclipse.emfforms.spi.core.services.databinding.DatabindingFailedException;
38: import org.eclipse.emfforms.spi.core.services.databinding.EMFFormsDatabinding;
39: import org.eclipse.emfforms.spi.core.services.domainexpander.EMFFormsDMRExpander;
40: import org.eclipse.emfforms.spi.core.services.domainexpander.EMFFormsDomainExpander;
41: import org.eclipse.emfforms.spi.core.services.domainexpander.EMFFormsExpandingFailedException;
42: import org.junit.Before;
43: import org.junit.Test;
44:
45: /**
46: * JUnit tests for {@link EMFFormsIndexDMRExpander}.
47: *
48: * @author Lucas Koehler
49: *
50: */
51: public class EMFFormsIndexDMRExpander_Test {
52:
53:         private EMFFormsIndexDMRExpander indexDMRExpander;
54:         private ReportService reportService;
55:         private EMFFormsDomainExpander domainExpander;
56:         private EMFFormsDatabinding databindingService;
57:
58:         /**
59:          * Creates a new {@link EMFFormsIndexDMRExpander} and mocks its required services for every test case.
60:          */
61:         @Before
62:         public void setUp() {
63:                 indexDMRExpander = new EMFFormsIndexDMRExpander();
64:                 reportService = mock(ReportService.class);
65:                 domainExpander = mock(EMFFormsDomainExpander.class);
66:                 databindingService = mock(EMFFormsDatabinding.class);
67:                 indexDMRExpander.setReportService(reportService);
68:                 indexDMRExpander.setEMFFormsDomainExpander(domainExpander);
69:                 indexDMRExpander.setEMFFormsDatabinding(databindingService);
70:         }
71:
72:         /**
73:          * Test method for
74:          * {@link org.eclipse.emfforms.internal.core.services.domainexpander.index.EMFFormsIndexDMRExpander#prepareDomainObject(org.eclipse.emf.ecp.view.spi.model.VDomainModelReference, org.eclipse.emf.ecore.EObject)}
75:          * .
76:          *
77:          * @throws EMFFormsExpandingFailedException
78:          */
79:         @Test(expected = IllegalArgumentException.class)
80:         public void testPrepareDomainObjectReferenceNull() throws EMFFormsExpandingFailedException {
81:                 indexDMRExpander.prepareDomainObject(null, mock(EObject.class));
82:         }
83:
84:         /**
85:          * Test method for
86:          * {@link org.eclipse.emfforms.internal.core.services.domainexpander.index.EMFFormsIndexDMRExpander#prepareDomainObject(org.eclipse.emf.ecp.view.spi.model.VDomainModelReference, org.eclipse.emf.ecore.EObject)}
87:          * .
88:          *
89:          * @throws EMFFormsExpandingFailedException
90:          */
91:         @Test(expected = IllegalArgumentException.class)
92:         public void testPrepareDomainObjectObjectNull() throws EMFFormsExpandingFailedException {
93:                 indexDMRExpander.prepareDomainObject(mock(VIndexDomainModelReference.class), null);
94:         }
95:
96:         /**
97:          * Test method for
98:          * {@link org.eclipse.emfforms.internal.core.services.domainexpander.index.EMFFormsIndexDMRExpander#prepareDomainObject(org.eclipse.emf.ecp.view.spi.model.VDomainModelReference, org.eclipse.emf.ecore.EObject)}
99:          * .
100:          *
101:          * @throws EMFFormsExpandingFailedException
102:          */
103:         @Test(expected = IllegalArgumentException.class)
104:         public void testPrepareDomainObjectBothNull() throws EMFFormsExpandingFailedException {
105:                 indexDMRExpander.prepareDomainObject(null, null);
106:         }
107:
108:         /**
109:          * Test method for
110:          * {@link org.eclipse.emfforms.internal.core.services.domainexpander.index.EMFFormsIndexDMRExpander#prepareDomainObject(org.eclipse.emf.ecp.view.spi.model.VDomainModelReference, org.eclipse.emf.ecore.EObject)}
111:          * .
112:          *
113:          * @throws EMFFormsExpandingFailedException
114:          */
115:         @Test(expected = IllegalArgumentException.class)
116:         public void testPrepareDomainObjectWrongReferenceType() throws EMFFormsExpandingFailedException {
117:                 indexDMRExpander.prepareDomainObject(mock(VFeaturePathDomainModelReference.class), mock(EObject.class));
118:         }
119:
120:         /**
121:          * Test method for
122:          * {@link org.eclipse.emfforms.internal.core.services.domainexpander.index.EMFFormsIndexDMRExpander#prepareDomainObject(org.eclipse.emf.ecp.view.spi.model.VDomainModelReference, org.eclipse.emf.ecore.EObject)}
123:          * .
124:          *
125:          * @throws EMFFormsExpandingFailedException
126:          * @throws DatabindingFailedException
127:          */
128:         @Test
129:         public void testPrepareDomainObjectWithPrefixDMRIndex0() throws EMFFormsExpandingFailedException,
130:                 DatabindingFailedException {
131:                 /*
132:                  * Note: Testing in JUnit tests is afaik only possible without using domain model e reference paths because
133:                  * they get expanded by the EMFFormsDomainExpander that has to be mocked in a JUnit test.
134:                  */
135:
136:                 final VIndexDomainModelReference indexDMR = VIndexdmrFactory.eINSTANCE.createIndexDomainModelReference();
137:                 final VFeaturePathDomainModelReference prefixDMR = VViewFactory.eINSTANCE
138:                         .createFeaturePathDomainModelReference();
139:                 prefixDMR.setDomainModelEFeature(TestPackage.eINSTANCE.getB_CList());
140:                 final VFeaturePathDomainModelReference targetDMR = VViewFactory.eINSTANCE
141:                         .createFeaturePathDomainModelReference();
142:                 targetDMR.setDomainModelEFeature(TestPackage.eINSTANCE.getD_X());
143:
144:                 indexDMR.setPrefixDMR(prefixDMR);
145:                 indexDMR.setTargetDMR(targetDMR);
146:                 indexDMR.setIndex(0);
147:
148:                 final B domainObject = TestFactory.eINSTANCE.createB();
149:
150:                 final IValueProperty valueProperty = mock(IValueProperty.class);
151:                 when(valueProperty.getValueType()).thenReturn(TestPackage.eINSTANCE.getB_CList());
152:                 when(valueProperty.getValue(domainObject)).thenReturn(domainObject.getCList());
153:
154:                 when(databindingService.getValueProperty(any(VDomainModelReference.class), same(domainObject))).thenReturn(
155:                         valueProperty);
156:
157:•                assertTrue(domainObject.getCList().size() == 0);
158:
159:                 indexDMRExpander.prepareDomainObject(indexDMR, domainObject);
160:•                assertTrue(domainObject.getCList().size() == 1);
161:                 assertNotNull(domainObject.getCList().get(0));
162:         }
163:
164:         /**
165:          * Test method for
166:          * {@link org.eclipse.emfforms.internal.core.services.domainexpander.index.EMFFormsIndexDMRExpander#prepareDomainObject(org.eclipse.emf.ecp.view.spi.model.VDomainModelReference, org.eclipse.emf.ecore.EObject)}
167:          * .
168:          *
169:          * @throws EMFFormsExpandingFailedException
170:          * @throws DatabindingFailedException
171:          */
172:         @Test
173:         public void testPrepareDomainObjectWithPrefixDMRIndex1() throws EMFFormsExpandingFailedException,
174:                 DatabindingFailedException {
175:                 /*
176:                  * Note: Testing in JUnit tests is afaik only possible without using domain model e reference paths because
177:                  * they get expanded by the EMFFormsDomainExpander that has to be mocked in a JUnit test.
178:                  */
179:
180:                 final VIndexDomainModelReference indexDMR = VIndexdmrFactory.eINSTANCE.createIndexDomainModelReference();
181:                 final VFeaturePathDomainModelReference prefixDMR = VViewFactory.eINSTANCE
182:                         .createFeaturePathDomainModelReference();
183:                 prefixDMR.setDomainModelEFeature(TestPackage.eINSTANCE.getB_CList());
184:                 final VFeaturePathDomainModelReference targetDMR = VViewFactory.eINSTANCE
185:                         .createFeaturePathDomainModelReference();
186:                 targetDMR.setDomainModelEFeature(TestPackage.eINSTANCE.getD_X());
187:
188:                 indexDMR.setPrefixDMR(prefixDMR);
189:                 indexDMR.setTargetDMR(targetDMR);
190:                 indexDMR.setIndex(1);
191:
192:                 final B domainObject = TestFactory.eINSTANCE.createB();
193:
194:                 final IValueProperty valueProperty = mock(IValueProperty.class);
195:                 when(valueProperty.getValueType()).thenReturn(TestPackage.eINSTANCE.getB_CList());
196:                 when(valueProperty.getValue(domainObject)).thenReturn(domainObject.getCList());
197:
198:                 when(databindingService.getValueProperty(any(VDomainModelReference.class), same(domainObject))).thenReturn(
199:                         valueProperty);
200:
201:                 indexDMRExpander.prepareDomainObject(indexDMR, domainObject);
202:•                assertTrue(domainObject.getCList().size() == 2);
203:                 assertNotNull(domainObject.getCList().get(0));
204:                 assertNotNull(domainObject.getCList().get(1));
205:         }
206:
207:         /**
208:          * Test method for
209:          * {@link org.eclipse.emfforms.internal.core.services.domainexpander.index.EMFFormsIndexDMRExpander#prepareDomainObject(org.eclipse.emf.ecp.view.spi.model.VDomainModelReference, org.eclipse.emf.ecore.EObject)}
210:          * .
211:          *
212:          * Tests whether the correct exception is thrown if the domain model e feature of the prefix dmr does not describe a
213:          * list.
214:          *
215:          * @throws EMFFormsExpandingFailedException
216:          * @throws DatabindingFailedException
217:          */
218:         @Test(expected = EMFFormsExpandingFailedException.class)
219:         public void testPrepareDomainObjectNoListWithPrefixDMR() throws EMFFormsExpandingFailedException,
220:                 DatabindingFailedException {
221:                 final VIndexDomainModelReference indexDMR = VIndexdmrFactory.eINSTANCE.createIndexDomainModelReference();
222:                 final VFeaturePathDomainModelReference prefixDMR = VViewFactory.eINSTANCE
223:                         .createFeaturePathDomainModelReference();
224:                 prefixDMR.setDomainModelEFeature(TestPackage.eINSTANCE.getB_C());
225:                 final VFeaturePathDomainModelReference targetDMR = VViewFactory.eINSTANCE
226:                         .createFeaturePathDomainModelReference();
227:                 targetDMR.setDomainModelEFeature(TestPackage.eINSTANCE.getC_D());
228:
229:                 indexDMR.setPrefixDMR(prefixDMR);
230:                 indexDMR.setTargetDMR(targetDMR);
231:                 indexDMR.setIndex(1);
232:
233:                 final B domainObject = TestFactory.eINSTANCE.createB();
234:
235:                 final IValueProperty valueProperty = mock(IValueProperty.class);
236:                 when(valueProperty.getValueType()).thenReturn(TestPackage.eINSTANCE.getB_C());
237:                 when(valueProperty.getValue(domainObject)).thenReturn(domainObject.getC());
238:
239:                 when(databindingService.getValueProperty(any(VDomainModelReference.class), same(domainObject))).thenReturn(
240:                         valueProperty);
241:
242:                 indexDMRExpander.prepareDomainObject(indexDMR, domainObject);
243:         }
244:
245:         /**
246:          * Test method for
247:          * {@link org.eclipse.emfforms.internal.core.services.domainexpander.index.EMFFormsIndexDMRExpander#prepareDomainObject(org.eclipse.emf.ecp.view.spi.model.VDomainModelReference, org.eclipse.emf.ecore.EObject)}
248:          * .
249:          *
250:          * Tests whether the correct exception is thrown if the domain model e feature of the index dmr does not describe a
251:          * list.
252:          *
253:          * @throws EMFFormsExpandingFailedException
254:          * @throws DatabindingFailedException
255:          */
256:         @Test(expected = EMFFormsExpandingFailedException.class)
257:         public void testPrepareDomainObjectNoListWithoutPrefixDMR() throws EMFFormsExpandingFailedException,
258:                 DatabindingFailedException {
259:                 final VIndexDomainModelReference indexDMR = VIndexdmrFactory.eINSTANCE.createIndexDomainModelReference();
260:                 final VFeaturePathDomainModelReference targetDMR = VViewFactory.eINSTANCE
261:                         .createFeaturePathDomainModelReference();
262:                 targetDMR.setDomainModelEFeature(TestPackage.eINSTANCE.getC_D());
263:
264:                 indexDMR.setDomainModelEFeature(TestPackage.eINSTANCE.getB_C());
265:                 indexDMR.setTargetDMR(targetDMR);
266:                 indexDMR.setIndex(1);
267:
268:                 final B domainObject = TestFactory.eINSTANCE.createB();
269:
270:                 final IValueProperty valueProperty = mock(IValueProperty.class);
271:                 when(valueProperty.getValueType()).thenReturn(TestPackage.eINSTANCE.getB_C());
272:                 when(valueProperty.getValue(domainObject)).thenReturn(domainObject.getC());
273:
274:                 when(databindingService.getValueProperty(any(VDomainModelReference.class), same(domainObject))).thenReturn(
275:                         valueProperty);
276:
277:                 indexDMRExpander.prepareDomainObject(indexDMR, domainObject);
278:         }
279:
280:         /**
281:          * Test method for
282:          * {@link org.eclipse.emfforms.internal.core.services.domainexpander.index.EMFFormsIndexDMRExpander#prepareDomainObject(org.eclipse.emf.ecp.view.spi.model.VDomainModelReference, org.eclipse.emf.ecore.EObject)}
283:          * .
284:          *
285:          * @throws EMFFormsExpandingFailedException
286:          * @throws DatabindingFailedException
287:          */
288:         @Test
289:         public void testPrepareDomainObjectWithoutPrefixDMRIndex0() throws EMFFormsExpandingFailedException,
290:                 DatabindingFailedException {
291:                 /*
292:                  * Note: Testing in JUnit tests is afaik know only possible without using domain model e reference paths because
293:                  * they get expanded by the EMFFormsDomainExpander that has to be mocked in a JUnit test.
294:                  */
295:
296:                 final VIndexDomainModelReference indexDMR = VIndexdmrFactory.eINSTANCE.createIndexDomainModelReference();
297:                 // indexDMR.getDomainModelEReferencePath().add(TestPackage.eINSTANCE.getA_B());
298:                 indexDMR.setDomainModelEFeature(TestPackage.eINSTANCE.getB_CList());
299:                 final VFeaturePathDomainModelReference targetDMR = VViewFactory.eINSTANCE
300:                         .createFeaturePathDomainModelReference();
301:                 // targetDMR.getDomainModelEReferencePath().add(TestPackage.eINSTANCE.getC_D());
302:                 targetDMR.setDomainModelEFeature(TestPackage.eINSTANCE.getD_X());
303:
304:                 indexDMR.setTargetDMR(targetDMR);
305:                 indexDMR.setIndex(0);
306:
307:                 final B domainObject = TestFactory.eINSTANCE.createB();
308:
309:                 final IValueProperty valueProperty = mock(IValueProperty.class);
310:                 when(valueProperty.getValueType()).thenReturn(TestPackage.eINSTANCE.getB_CList());
311:                 when(valueProperty.getValue(domainObject)).thenReturn(domainObject.getCList());
312:
313:                 when(databindingService.getValueProperty(any(VDomainModelReference.class), same(domainObject))).thenReturn(
314:                         valueProperty);
315:
316:•                assertTrue(domainObject.getCList().size() == 0);
317:
318:                 indexDMRExpander.prepareDomainObject(indexDMR, domainObject);
319:                 // assertNotNull(domainObject.getB());
320:•                assertTrue(domainObject.getCList().size() == 1);
321:                 assertNotNull(domainObject.getCList().get(0));
322:                 // assertNotNull(domainObject.getCList().get(1).getD());
323:         }
324:
325:         /**
326:          * Test method for
327:          * {@link org.eclipse.emfforms.internal.core.services.domainexpander.index.EMFFormsIndexDMRExpander#prepareDomainObject(org.eclipse.emf.ecp.view.spi.model.VDomainModelReference, org.eclipse.emf.ecore.EObject)}
328:          * .
329:          *
330:          * @throws EMFFormsExpandingFailedException
331:          * @throws DatabindingFailedException
332:          */
333:         @Test
334:         public void testPrepareDomainObjectWithoutPrefixDMRIndex1() throws EMFFormsExpandingFailedException,
335:                 DatabindingFailedException {
336:                 /*
337:                  * Note: Testing in JUnit tests is afaik know only possible without using domain model e reference paths because
338:                  * they get expanded by the EMFFormsDomainExpander that has to be mocked in a JUnit test.
339:                  */
340:
341:                 final VIndexDomainModelReference indexDMR = VIndexdmrFactory.eINSTANCE.createIndexDomainModelReference();
342:                 // indexDMR.getDomainModelEReferencePath().add(TestPackage.eINSTANCE.getA_B());
343:                 indexDMR.setDomainModelEFeature(TestPackage.eINSTANCE.getB_CList());
344:                 final VFeaturePathDomainModelReference targetDMR = VViewFactory.eINSTANCE
345:                         .createFeaturePathDomainModelReference();
346:                 // targetDMR.getDomainModelEReferencePath().add(TestPackage.eINSTANCE.getC_D());
347:                 targetDMR.setDomainModelEFeature(TestPackage.eINSTANCE.getD_X());
348:
349:                 indexDMR.setTargetDMR(targetDMR);
350:                 indexDMR.setIndex(1);
351:
352:                 final B domainObject = TestFactory.eINSTANCE.createB();
353:
354:                 final IValueProperty valueProperty = mock(IValueProperty.class);
355:                 when(valueProperty.getValueType()).thenReturn(TestPackage.eINSTANCE.getB_CList());
356:                 when(valueProperty.getValue(domainObject)).thenReturn(domainObject.getCList());
357:
358:                 when(databindingService.getValueProperty(any(VDomainModelReference.class), same(domainObject))).thenReturn(
359:                         valueProperty);
360:
361:•                assertTrue(domainObject.getCList().size() == 0);
362:
363:                 indexDMRExpander.prepareDomainObject(indexDMR, domainObject);
364:                 // assertNotNull(domainObject.getB());
365:•                assertTrue(domainObject.getCList().size() == 2);
366:                 assertNotNull(domainObject.getCList().get(0));
367:                 assertNotNull(domainObject.getCList().get(1));
368:                 // assertNotNull(domainObject.getCList().get(1).getD());
369:         }
370:
371:         /**
372:          * Test method for
373:          * {@link org.eclipse.emfforms.internal.core.services.domainexpander.index.EMFFormsIndexDMRExpander#isApplicable(org.eclipse.emf.ecp.view.spi.model.VDomainModelReference)}
374:          * .
375:          */
376:         @Test
377:         public void testIsApplicable() {
378:                 assertEquals(5d, indexDMRExpander.isApplicable(mock(VIndexDomainModelReference.class)), 0d);
379:         }
380:
381:         /**
382:          * Test method for
383:          * {@link org.eclipse.emfforms.internal.core.services.domainexpander.index.EMFFormsIndexDMRExpander#isApplicable(org.eclipse.emf.ecp.view.spi.model.VDomainModelReference)}
384:          * .
385:          */
386:         @Test
387:         public void testIsApplicableNull() {
388:                 assertEquals(EMFFormsDMRExpander.NOT_APPLICABLE, indexDMRExpander.isApplicable(null), 0d);
389:                 verify(reportService).report(any(AbstractReport.class));
390:         }
391:
392:         /**
393:          * Test method for
394:          * {@link org.eclipse.emfforms.internal.core.services.domainexpander.index.EMFFormsIndexDMRExpander#isApplicable(org.eclipse.emf.ecp.view.spi.model.VDomainModelReference)}
395:          * .
396:          */
397:         @Test()
398:         public void testIsApplicableWrongReferenceType() {
399:                 assertEquals(EMFFormsDMRExpander.NOT_APPLICABLE,
400:                         indexDMRExpander.isApplicable(mock(VFeaturePathDomainModelReference.class)), 0d);
401:         }
402: }