Package: QueryPropertyInvocationTest

QueryPropertyInvocationTest

nameinstructionbranchcomplexitylinemethod
QueryPropertyInvocationTest()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getModuleLocation()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getReferencePath()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
testDualTemplateInvocation()
M: 12 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2008, 2012 Obeo.
3: * All rights reserved. This program and the accompanying materials
4: * are made available under the terms of the Eclipse Public License v1.0
5: * which accompanies this distribution, and is available at
6: * http://www.eclipse.org/legal/epl-v10.html
7: *
8: * Contributors:
9: * Obeo - initial API and implementation
10: *******************************************************************************/
11: package org.eclipse.acceleo.engine.tests.unit.blocks.templateinvocation;
12:
13: import java.io.IOException;
14:
15: import org.eclipse.acceleo.engine.tests.unit.AbstractAcceleoTest;
16: import org.junit.Test;
17:
18: /**
19: * Tests the behavior of template invocations.
20: *
21: * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
22: */
23: public class QueryPropertyInvocationTest extends AbstractAcceleoTest {
24:         /**
25:          * {@inheritDoc}
26:          *
27:          * @see org.eclipse.acceleo.engine.tests.unit.AbstractAcceleoTest#getModuleLocation()
28:          */
29:         @Override
30:         public String getModuleLocation() {
31:                 return "data/TemplateInvocation/property_call_query_source.mtl"; //$NON-NLS-1$
32:         }
33:
34:         /**
35:          * {@inheritDoc}
36:          *
37:          * @see org.eclipse.acceleo.engine.tests.unit.AbstractAcceleoTest#getReferencePath()
38:          */
39:         @Override
40:         public String getReferencePath() {
41:                 return "TemplateInvocation"; //$NON-NLS-1$
42:         }
43:
44:         /**
45:          * Tests that the template invocations can be used as parameters of other template invocations.
46:          *
47:          * @throws IOException
48:          * Thrown when the output cannot be saved.
49:          */
50:         @Test
51:         public void testDualTemplateInvocation() throws IOException {
52:                 this.init("QueryPropertyInvocation"); //$NON-NLS-1$
53:                 this.generate("test", defaultStrategy); //$NON-NLS-1$
54:                 this.compareDirectories();
55:         }
56: }