1 package org.apache.turbine.services.schedule; 2 3 18 19 import junit.framework.Test; 20 import junit.framework.TestSuite; 21 22 import org.apache.turbine.test.BaseTestCase; 23 24 31 public class JobEntryTest extends BaseTestCase 32 { 33 private JobEntry je1; 34 private JobEntry je2; 35 36 public JobEntryTest(String name) 37 throws Exception 38 { 39 super(name); 40 41 je1 = new JobEntry(); 43 je1.setJobId(1); 44 je1.setSecond(0); 45 je1.setMinute(1); 46 je1.setHour(-1); 47 je1.setDayOfMonth(-1); 48 je1.setWeekDay(-1); 49 je1.setTask("SimpleJob"); 50 51 je2 = new JobEntry(); 52 je2.setJobId(2); 53 je2.setSecond(0); 54 je2.setMinute(1); 55 je2.setHour(-1); 56 je2.setDayOfMonth(-1); 57 je2.setWeekDay(-1); 58 je2.setTask("SimpleJob"); 59 } 60 61 public static Test suite() 62 { 63 return new TestSuite(JobEntryTest.class); 64 } 65 66 69 public void testCompareTo() 70 { 71 assertFalse(je1.equals(je2)); 72 je2.setJobId(je1.getJobId()); 73 assertTrue(je1.equals(je2)); 74 75 } 76 77 } 78 | Popular Tags |