View Javadoc

1   package org.codehaus.modello.plugin.java;
2   
3   import java.util.Properties;
4   
5   import org.codehaus.modello.AbstractModelloJavaGeneratorTest;
6   import org.codehaus.modello.core.ModelloCore;
7   import org.codehaus.modello.model.Model;
8   
9   public class InterfaceAssociationTest
10      extends AbstractModelloJavaGeneratorTest
11  {
12      public InterfaceAssociationTest()
13      {
14          super( "interfaceAssociationTest" );
15      }
16  
17      public void testJavaGenerator()
18          throws Throwable
19      {
20          if ( skipJava5FeatureTest() )
21          {
22              return;
23          }
24  
25          ModelloCore modello = (ModelloCore) lookup( ModelloCore.ROLE );
26  
27          Model model = modello.loadModel( getXmlResourceReader( "/models/interfaceAssociation.mdo" ) );
28  
29          Properties parameters = getModelloParameters( "4.0.0", true );
30  
31          modello.generate( model, "java", parameters );
32  
33          compileGeneratedSources( true );
34  
35          verifyCompiledGeneratedSources( "InterfaceAssociationVerifier" );
36      }
37  
38  }