1 26 27 package net.sourceforge.groboutils.pmti.v1; 28 29 import net.sourceforge.groboutils.autodoc.v1.AutoDoc; 30 import org.easymock.EasyMock; 31 import org.easymock.MockControl; 32 import net.sourceforge.groboutils.junit.v1.iftc.*; 33 import junit.framework.Test; 34 import junit.framework.TestCase; 35 import junit.framework.TestSuite; 36 37 38 45 public class IIssueUTestI extends InterfaceTestCase 46 { 47 50 private static final Class THIS_CLASS = IIssueUTestI.class; 51 private static final AutoDoc DOC = new AutoDoc( THIS_CLASS ); 52 53 public IIssueUTestI( String name, ImplFactory f ) 54 { 55 super( name, IIssue.class, f ); 56 } 57 58 59 public IIssue createIIssue() 60 { 61 return (IIssue)createImplObject(); 62 } 63 64 65 68 69 public void testGetID1() 70 { 71 IIssue issue = createIIssue(); 72 assertNotNull( issue.getID() ); 73 } 74 75 76 public void testGetType1() 77 { 78 IIssue issue = createIIssue(); 79 assertNotNull( issue.getType() ); 80 } 81 82 83 public void testGetShortDescription1() 84 { 85 IIssue issue = createIIssue(); 86 issue.getShortDescription(); 88 } 89 90 91 public void testGetState1() 92 { 93 IIssue issue = createIIssue(); 94 IIssueState state = issue.getState(); 95 if (state != null) 96 { 97 assertNotNull( state.getName() ); 99 } 100 } 101 102 103 public void testGetAttributes1() 104 { 105 IIssue issue = createIIssue(); 106 assertNotNull( issue.getAttributes() ); 107 } 108 109 110 public void testReload1() 111 { 112 IIssue issue = createIIssue(); 113 try 114 { 115 IIssue reloaded = issue.reload(); 116 assertNotNull( 117 "Null reloaded issue", 118 reloaded ); 119 assertEquals( 120 reloaded.getID(), 121 issue.getID() ); 122 assertEquals( 123 reloaded.getType(), 124 issue.getType() ); 125 } 126 catch (ProblemManagerException pme) 127 { 128 assertNotNull( 129 "Raised exception "+pme+" has null message.", 130 pme.getMessage() ); 131 } 132 } 133 134 135 136 137 138 139 140 143 144 public static InterfaceTestSuite suite() 145 { 146 InterfaceTestSuite suite = new InterfaceTestSuite( THIS_CLASS ); 147 148 return suite; 149 } 150 151 public static void main( String [] args ) 152 { 153 String [] name = { THIS_CLASS.getName() }; 154 155 158 junit.textui.TestRunner.main( name ); 159 } 160 161 162 166 protected void setUp() throws Exception 167 { 168 super.setUp(); 169 170 } 172 173 174 178 protected void tearDown() throws Exception 179 { 180 182 183 super.tearDown(); 184 } 185 } 186 187 | Popular Tags |