#555 - Use a common timestamp value for @WhenCreated and @WhenModified

This commit is contained in:
Robin Bygrave committed 2016-02-09 14:48:41 +13:00
1 parent 11723e3a32
commit 4272c17689
24 files changed
+145 -80

No files matched your search

@@ -8,7 +8,7 @@ import java.sql.Timestamp;
import java.time.LocalDateTime;
import java.time.OffsetDateTime;
import static org.junit.Assert.*;
import static org.junit.Assert.assertTrue;
public class InsertTimestampFactoryTest {
@@ -20,7 +20,7 @@ public class InsertTimestampFactoryTest {
DeployBeanProperty prop = new DeployBeanProperty(null, LocalDateTime.class, null, null);
GeneratedProperty insertTimestamp = factory.createInsertTimestamp(prop);
Object value = insertTimestamp.getInsertValue(null, null);
Object value = insertTimestamp.getInsertValue(null, null, System.currentTimeMillis());
assertTrue(value instanceof LocalDateTime);
}
@@ -30,7 +30,7 @@ public class InsertTimestampFactoryTest {
DeployBeanProperty prop = new DeployBeanProperty(null, OffsetDateTime.class, null, null);
GeneratedProperty insertTimestamp = factory.createInsertTimestamp(prop);
Object value = insertTimestamp.getInsertValue(null, null);
Object value = insertTimestamp.getInsertValue(null, null, System.currentTimeMillis());
assertTrue(value instanceof OffsetDateTime);
}
@@ -40,7 +40,7 @@ public class InsertTimestampFactoryTest {
DeployBeanProperty prop = new DeployBeanProperty(null, Timestamp.class, null, null);
GeneratedProperty insertTimestamp = factory.createInsertTimestamp(prop);
Object value = insertTimestamp.getInsertValue(null, null);
Object value = insertTimestamp.getInsertValue(null, null, System.currentTimeMillis());
assertTrue(value instanceof Timestamp);
}
@@ -50,7 +50,7 @@ public class InsertTimestampFactoryTest {
DeployBeanProperty prop = new DeployBeanProperty(null, java.util.Date.class, null, null);
GeneratedProperty insertTimestamp = factory.createInsertTimestamp(prop);
Object value = insertTimestamp.getInsertValue(null, null);
Object value = insertTimestamp.getInsertValue(null, null, System.currentTimeMillis());
assertTrue(value instanceof java.util.Date);
}
@@ -21,7 +21,7 @@ public class UpdateTimestampFactoryTest {
DeployBeanProperty prop = new DeployBeanProperty(null, LocalDateTime.class, null, null);
GeneratedProperty generatedProperty = factory.createUpdateTimestamp(prop);
Object value = generatedProperty.getInsertValue(null, null);
Object value = generatedProperty.getInsertValue(null, null, System.currentTimeMillis());
assertTrue(value instanceof LocalDateTime);
}
@@ -31,7 +31,7 @@ public class UpdateTimestampFactoryTest {
DeployBeanProperty prop = new DeployBeanProperty(null, OffsetDateTime.class, null, null);
GeneratedProperty generatedProperty = factory.createUpdateTimestamp(prop);
Object value = generatedProperty.getInsertValue(null, null);
Object value = generatedProperty.getInsertValue(null, null, System.currentTimeMillis());
assertTrue(value instanceof OffsetDateTime);
}
@@ -41,7 +41,7 @@ public class UpdateTimestampFactoryTest {
DeployBeanProperty prop = new DeployBeanProperty(null, Timestamp.class, null, null);
GeneratedProperty generatedProperty = factory.createUpdateTimestamp(prop);
Object value = generatedProperty.getInsertValue(null, null);
Object value = generatedProperty.getInsertValue(null, null, System.currentTimeMillis());
assertTrue(value instanceof Timestamp);
}
@@ -51,7 +51,7 @@ public class UpdateTimestampFactoryTest {
DeployBeanProperty prop = new DeployBeanProperty(null, java.util.Date.class, null, null);
GeneratedProperty generatedProperty = factory.createUpdateTimestamp(prop);
Object value = generatedProperty.getInsertValue(null, null);
Object value = generatedProperty.getInsertValue(null, null, System.currentTimeMillis());
assertTrue(value instanceof java.util.Date);
}
}