1 37 package net.sourceforge.cruisecontrol.sourcecontrols; 38 39 import junit.framework.TestCase; 40 import net.sourceforge.cruisecontrol.CruiseControlException; 41 42 public class StarTeamTest extends TestCase { 43 44 public StarTeamTest(String name) { 45 super(name); 46 } 47 48 public void testValidate() { 49 50 StarTeam st = new StarTeam(); 51 try { 52 st.validate(); 53 fail("StarTeam should throw exceptions when required fields are not set."); 54 } catch (CruiseControlException e) { 55 assertTrue(true); 56 } 57 58 st.setFolder("folder"); 59 st.setStarteamurl("url"); 60 st.setUsername("username"); 61 st.setPassword("password"); 62 63 try { 64 st.validate(); 65 assertTrue(true); 66 } catch (CruiseControlException e) { 67 fail("StarTeam should not throw exceptions when required fields are set."); 68 } 69 } 70 } 71 | Popular Tags |