commit
c3fbc7e187
@ -17,7 +17,7 @@ public class StringUtils {
|
|||||||
OffsetDateTime odt = (OffsetDateTime)o;
|
OffsetDateTime odt = (OffsetDateTime)o;
|
||||||
return odt.format(DateTimeFormatter.ofPattern(DEFAULT_PATTERN));
|
return odt.format(DateTimeFormatter.ofPattern(DEFAULT_PATTERN));
|
||||||
} else if (o == null) {
|
} else if (o == null) {
|
||||||
return "null";
|
return "";
|
||||||
} else {
|
} else {
|
||||||
return o.toString();
|
return o.toString();
|
||||||
}
|
}
|
||||||
|
@ -112,7 +112,7 @@ public class ToFromConversionTests extends RefineTest {
|
|||||||
@Test
|
@Test
|
||||||
public void testToString() throws CalendarParserException {
|
public void testToString() throws CalendarParserException {
|
||||||
Assert.assertTrue(invoke("toString") instanceof EvalError);
|
Assert.assertTrue(invoke("toString") instanceof EvalError);
|
||||||
Assert.assertEquals(invoke("toString", (Object) null), "null");
|
Assert.assertEquals(invoke("toString", (Object) null), "");
|
||||||
Assert.assertEquals(invoke("toString", Long.valueOf(100)),"100");
|
Assert.assertEquals(invoke("toString", Long.valueOf(100)),"100");
|
||||||
Assert.assertEquals(invoke("toString", Double.valueOf(100.0)),"100.0");
|
Assert.assertEquals(invoke("toString", Double.valueOf(100.0)),"100.0");
|
||||||
Assert.assertEquals(invoke("toString", Double.valueOf(100.0),"%.0f"),"100");
|
Assert.assertEquals(invoke("toString", Double.valueOf(100.0),"%.0f"),"100");
|
||||||
|
Loading…
Reference in New Issue
Block a user