BATCH-84: Fixes for two test failures discovered by CI

This commit is contained in:
lucasward
2008-01-07 06:38:35 +00:00
parent e39f02a8d7
commit cea8294db7

View File

@@ -1,5 +1,6 @@
package org.springframework.batch.execution.resource;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import junit.framework.TestCase;
@@ -12,6 +13,8 @@ public class DefaultJobIdentifierLabelGeneratorTests extends TestCase {
DefaultJobIdentifierLabelGenerator instance = new DefaultJobIdentifierLabelGenerator();
DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
/**
* Test method for {@link org.springframework.batch.execution.resource.DefaultJobIdentifierLabelGenerator#getLabel()}.
*/
@@ -30,7 +33,8 @@ public class DefaultJobIdentifierLabelGeneratorTests extends TestCase {
* Test method for {@link org.springframework.batch.execution.resource.DefaultJobIdentifierLabelGenerator#getLabel()}.
*/
public void testDefaultGetLabel() throws Exception {
assertEquals("null--19700101", instance.getLabel(new ScheduledJobIdentifier(null)));
System.out.println(instance.getLabel(new ScheduledJobIdentifier(null, dateFormat.parse("19700101"))));
assertEquals("null-null-19700101", instance.getLabel(new ScheduledJobIdentifier(null, dateFormat.parse("19700101"))));
}
/**