@@ -0,0 +1,2692 @@
+package org.codehaus.modello.plugin.java;%0A%0A/*%0A * Copyright (c) 2004, Codehaus.org%0A *%0A * Permission is hereby granted, free of charge, to any person obtaining a copy of%0A * this software and associated documentation files (the %22Software%22), to deal in%0A * the Software without restriction, including without limitation the rights to%0A * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies%0A * of the Software, and to permit persons to whom the Software is furnished to do%0A * so, subject to the following conditions:%0A *%0A * The above copyright notice and this permission notice shall be included in all%0A * copies or substantial portions of the Software.%0A *%0A * THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR%0A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,%0A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE%0A * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER%0A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,%0A * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE%0A * SOFTWARE.%0A */%0A%0Aimport java.util.Properties;%0A%0Aimport org.codehaus.modello.AbstractModelloJavaGeneratorTest;%0Aimport org.codehaus.modello.ModelloParameterConstants;%0Aimport org.codehaus.modello.core.ModelloCore;%0Aimport org.codehaus.modello.model.Model;%0A%0A/**%0A * Check that annotations are not added to generated sources when Java 5 features are not enabled.%0A *%0A * @version $Id$%0A */%0Apublic class AnnotationsJava4GeneratorTest%0A    extends AbstractModelloJavaGeneratorTest%0A%7B%0A    public AnnotationsJava4GeneratorTest()%0A    %7B%0A        super( %22annotations-java4%22 );%0A    %7D%0A%0A    public void testJava4GeneratorWithAnnotations()%0A        throws Throwable%0A    %7B%0A        ModelloCore modello = (ModelloCore) lookup( ModelloCore.ROLE );%0A%0A        Model model = modello.loadModel( getXmlResourceReader( %22/models/annotations.mdo%22 ) );%0A%0A        Properties parameters = new Properties();%0A        parameters.setProperty( ModelloParameterConstants.OUTPUT_DIRECTORY, getOutputDirectory().getAbsolutePath() );%0A        parameters.setProperty( ModelloParameterConstants.PACKAGE_WITH_VERSION, Boolean.toString( false ) );%0A        parameters.setProperty( ModelloParameterConstants.VERSION, %221.0.0%22 );%0A        parameters.setProperty( ModelloParameterConstants.USE_JAVA5, Boolean.toString( false ) );%0A%0A        modello.generate( model, %22java%22, parameters );%0A%0A        addDependency( %22javax.xml.bind%22, %22jaxb-api%22, %222.1%22 );%0A        addDependency( %22org.apache.geronimo.specs%22, %22geronimo-jpa_2.0_spec%22, %221.0%22 );%0A        compile( getOutputDirectory(), getOutputClasses(), false );%0A    %7D%0A%7D

check that annotations aren't added to generated code when Java5 option is not enabled