1 37 package net.sourceforge.cruisecontrol.sourcecontrols; 38 39 import junit.framework.TestCase; 40 import net.sourceforge.cruisecontrol.CruiseControlException; 41 42 public class MKSTest extends TestCase { 43 44 public MKSTest(String name) { 45 super(name); 46 } 47 48 public void testValidate() { 49 50 MKS mks = new MKS(); 51 52 try { 53 mks.validate(); 54 fail("MKS should throw exceptions when required attributes are not set."); 55 } catch (CruiseControlException e) { 56 assertTrue(true); 57 } 58 59 mks.setLocalWorkingDir("empty"); 60 61 try { 62 mks.validate(); 63 fail("MKS should throw exceptions when required attributes are not set."); 64 } catch (CruiseControlException e) { 65 assertTrue(true); 66 } 67 68 mks.setProject("empty"); 69 70 try { 71 mks.validate(); 72 assertTrue(true); 73 } catch (CruiseControlException e) { 74 fail("MKS should not throw exceptions when required attributes are set."); 75 } 76 } 77 } 78 | Popular Tags |