View Javadoc

1   package org.codehaus.modello.model;
2   
3   import junit.framework.TestCase;
4   
5   public class VersionDefinitionTest
6       extends TestCase
7   {
8   
9       public void testFieldType()
10      {
11          VersionDefinition def = new VersionDefinition();
12          def.setType( "field" );
13          assertTrue( def.isFieldType() );
14          assertFalse( def.isNamespaceType() );
15      }
16      
17      public void testNamespaceType()
18      {
19          VersionDefinition def = new VersionDefinition();
20          def.setType( "namespace" );
21          assertTrue( def.isNamespaceType() );
22          assertFalse( def.isFieldType() );
23      }
24  
25      public void testFieldAndNamespaceType()
26      {
27          VersionDefinition def = new VersionDefinition();
28          def.setType( "field+namespace" );
29          assertTrue( def.isFieldType() );
30          assertTrue( def.isNamespaceType() );
31      }
32  
33      
34  }