<%@ jet package="org.eclipse.emf.codegen.ecore.templates.model.tests" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="ModelTestSuite" %>
<%
/**
 * 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
 */
%>
<%GenModel genModel = (GenModel)argument; /* Trick to import java.util.* without warnings */Iterator.class.getName();%>
<%final boolean isJDK50 = genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50;%>
<%@ include file="../Header.javajetinc"%>
package <%=genModel.getTestSuitePackageName()%>;

<%genModel.markImportLocation(stringBuffer);%>

/**
 * <!-- begin-user-doc -->
 * A test suite for the '<em><b><%=genModel.getModelName()%></b></em>' model.
 * <!-- end-user-doc -->
<%if (genModel.hasAPITags()) {%>
 * <%=genModel.getAPITags(genModel.getIndentation(stringBuffer))%>
<%}%>
 * @generated
 */
<%if (isJDK50 && genModel.hasAPIDeprecatedTag()) {%>
@Deprecated
<%} else if (isJDK50) {
  boolean needsSuppressDeprecation = false;
  LOOP: for (GenPackage genPackage : genModel.getAllGenPackagesWithClassifiers()) { if (genPackage.hasTests()) { for (GenClass genClass : genPackage.getGenClasses()) { if (!genClass.isExternalInterface() && !genClass.isAbstract() && genClass.hasTests() && genClass.hasImplicitAPIDeprecatedTag()) { needsSuppressDeprecation = true; break LOOP; }}}}
  if (needsSuppressDeprecation) {%>
@SuppressWarnings("deprecation")
<%}}%>
public class <%=genModel.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 <%=genModel.getTestSuiteClassName()%>("<%=genModel.getModelName()%> Tests");<%=genModel.getNonNLS()%>
<%for (GenPackage genPackage : genModel.getAllGenPackagesWithClassifiers()) {%>
  <%if (genPackage.hasTests()) {%>
		suite.addTest(<%=genModel.getImportedName(genPackage.getImportedTestSuiteClassName())%>.suite());
  <%}%>
<%}%>
		return suite;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public <%=genModel.getTestSuiteClassName()%>(String name)
	{
		super(name);
	}

} //<%=genModel.getTestSuiteClassName()%>
<%genModel.emitSortedImports();%>
