1   package com.sri.emo.wizard.defaults;
2   
3   import junit.framework.*;
4   
5   /***
6    * Fills in untested code in the wizard metadata.
7    * @author Michael Rimov
8    */
9   public class TestEmoWizardMetadata extends TestCase {
10      private EmoWizardMetadata emoWizardMetadata = null;
11  
12      protected void setUp() throws Exception {
13          super.setUp();
14          emoWizardMetadata = new EmoWizardMetadata();
15      }
16  
17      protected void tearDown() throws Exception {
18          emoWizardMetadata = null;
19          super.tearDown();
20      }
21  
22      public void testEquals() {
23  
24          assertFalse(emoWizardMetadata.equals(null));
25          assertFalse(emoWizardMetadata.equals(new Object()));
26          assertTrue(emoWizardMetadata.equals(emoWizardMetadata));
27          Object parm1 = null;
28          boolean expectedReturn = false;
29          boolean actualReturn = emoWizardMetadata.equals(parm1);
30          assertEquals("return value", expectedReturn, actualReturn);
31      }
32  
33      public void testGetViewId() {
34          assertNull(emoWizardMetadata.getViewId());
35          final String view = "TestView";
36          emoWizardMetadata.setViewId(view);
37          assertEquals(view, emoWizardMetadata.getViewId());
38      }
39  
40      public void testHashCode() {
41          final String title = "This is a test!";
42          emoWizardMetadata.setTitle(title);
43          assertEquals(title.hashCode(), emoWizardMetadata.hashCode());
44      }
45  
46      public void testIsEntry() {
47          assertFalse(emoWizardMetadata.isEntry());
48          emoWizardMetadata.setEntry(true);
49          assertTrue(emoWizardMetadata.isEntry());
50      }
51  
52      public void testToString() {
53          final String title = "This is a test!";
54          emoWizardMetadata.setTitle(title);
55          assertTrue(emoWizardMetadata.toString().indexOf(title) > 0);
56      }
57  
58  }