Sha256: 5237e7de1be873110696ed0704432ebbb29cfc1686cb1bfe07f21a27549da92f
Contents?: true
Size: 796 Bytes
Versions: 7
Compression:
Stored size: 796 Bytes
Contents
package org.embulk.parser.jsonpath.cast; import org.embulk.spi.time.Timestamp; import org.junit.Test; import static org.junit.Assert.assertEquals; public class TestLongCast { @Test public void asBoolean() { assertEquals(true, LongCast.asBoolean(1)); assertEquals(false, LongCast.asBoolean(0)); } @Test public void asLong() { assertEquals(1, LongCast.asLong(1)); } @Test public void asDouble() { assertEquals(1.0, LongCast.asDouble(1), 0.0); } @Test public void asString() { assertEquals("1", LongCast.asString(1)); } @Test public void asTimestamp() { Timestamp expected = Timestamp.ofEpochSecond(1); assertEquals(expected, LongCast.asTimestamp(1)); } }
Version data entries
7 entries across 7 versions & 1 rubygems