Remove java.sql.Timestamp from domain objects.

This commit is contained in:
dsyer
2007-12-22 09:43:04 +00:00
parent c022df6ce0
commit 19164926b6
12 changed files with 89 additions and 116 deletions

View File

@@ -15,7 +15,7 @@
*/
package org.springframework.batch.core.domain;
import java.sql.Timestamp;
import java.util.Date;
import junit.framework.TestCase;
@@ -44,7 +44,7 @@ public class JobExecutionTests extends TestCase {
*/
public void testGetEndTime() {
assertNull(execution.getEndTime());
execution.setEndTime(new Timestamp(100L));
execution.setEndTime(new Date(100L));
assertEquals(100L, execution.getEndTime().getTime());
}
@@ -53,7 +53,7 @@ public class JobExecutionTests extends TestCase {
*/
public void testIsRunning() {
assertTrue(execution.isRunning());
execution.setEndTime(new Timestamp(100L));
execution.setEndTime(new Date(100L));
assertFalse(execution.isRunning());
}
@@ -62,7 +62,7 @@ public class JobExecutionTests extends TestCase {
*/
public void testGetStartTime() {
assertNotNull(execution.getStartTime());
execution.setStartTime(new Timestamp(0L));
execution.setStartTime(new Date(0L));
assertEquals(0L, execution.getStartTime().getTime());
}

View File

@@ -15,13 +15,13 @@
*/
package org.springframework.batch.core.domain;
import java.sql.Timestamp;
import java.util.Date;
import java.util.Properties;
import org.springframework.batch.repeat.ExitStatus;
import junit.framework.TestCase;
import org.springframework.batch.repeat.ExitStatus;
/**
* @author Dave Syer
*
@@ -45,7 +45,7 @@ public class StepExecutionTests extends TestCase {
*/
public void testGetEndTime() {
assertNull(execution.getEndTime());
execution.setEndTime(new Timestamp(0L));
execution.setEndTime(new Date(0L));
assertEquals(0L, execution.getEndTime().getTime());
}
@@ -55,7 +55,7 @@ public class StepExecutionTests extends TestCase {
*/
public void testGetStartTime() {
assertNotNull(execution.getStartTime());
execution.setStartTime(new Timestamp(10L));
execution.setStartTime(new Date(10L));
assertEquals(10L, execution.getStartTime().getTime());
}