| |
| <% |
| /** |
| * Copyright (c) 2005 IBM Corporation and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v2.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v20.html |
| * |
| * Contributors: |
| * IBM - Initial API and implementation |
| */ |
| %> |
| <%GenPackage genPackage = (GenPackage)argument; GenModel genModel = genPackage.getGenModel(); /* Trick to import java.util.* without warnings */Iterator.class.getName();%> |
| <%final boolean isJDK50 = genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50;%> |
| <%@ egf:patternCall patternId="platform:/plugin/org.eclipse.egf.emf.pattern.base/egf/EMF_Pattern_Base.fcore#LogicalName=org.eclipse.egf.emf.pattern.base.HeaderJava" args="parameter:argument"%> |
| package <%=genPackage.getTestsPackageName()%>; |
| |
| <%genModel.markImportLocation(stringBuffer);%> |
| |
| /** |
| * <!-- begin-user-doc --> |
| * A test suite for the '<em><b><%=genPackage.getPackageName()%></b></em>' package. |
| * <!-- end-user-doc --> |
| <%if (genPackage.hasAPITags()) {%> |
| * <%=genPackage.getAPITags(genModel.getIndentation(stringBuffer))%> |
| <%}%> |
| * @generated |
| */ |
| <%if (isJDK50 && genPackage.hasAPIDeprecatedTag()) {%> |
| @Deprecated |
| <%} else if (isJDK50) { |
| boolean needsSuppressDeprecation = false; |
| for (GenClass genClass : genPackage.getGenClasses()) { if (!genClass.isExternalInterface() && !genClass.isAbstract() && genClass.hasTests() && genClass.hasImplicitAPIDeprecatedTag()) { needsSuppressDeprecation = true; break; }} |
| if (needsSuppressDeprecation) {%> |
| @SuppressWarnings("deprecation") |
| <%}}%> |
| public class <%=genPackage.getTestSuiteClassName()%> extends <%=genModel.getImportedName("junit.framework.TestSuite")%> |
| { |
| <%if (genModel.hasCopyrightField()) {%> |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static final <%=genModel.getImportedName("java.lang.String")%> copyright = <%=genModel.getCopyrightFieldLiteral()%>;<%=genModel.getNonNLS()%> |
| <%}%> |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static void main(String[] args) |
| { |
| <%=genModel.getImportedName("junit.textui.TestRunner")%>.run(suite()); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static <%=genModel.getImportedName("junit.framework.Test")%> suite() |
| { |
| <%=genModel.getImportedName("junit.framework.TestSuite")%> suite = new <%=genPackage.getTestSuiteClassName()%>("<%=genPackage.getPackageName()%> Tests");<%=genModel.getNonNLS()%> |
| <%for (GenClass genClass : genPackage.getGenClasses()) {%> |
| <%if (!genClass.isExternalInterface() && !genClass.isAbstract() && genClass.hasTests()) {%> |
| suite.addTestSuite(<%=genClass.getImportedTestCaseClassName()%>.class); |
| <%}%> |
| <%}%> |
| return suite; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public <%=genPackage.getTestSuiteClassName()%>(String name) |
| { |
| super(name); |
| } |
| |
| } //<%=genPackage.getTestSuiteClassName()%> |
| <%genModel.emitSortedImports();%> |