DateTimeUtilTest.java 2.12 KB
Newer Older
Lee Jaebin committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
package jp.agentec.adf.util;

import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import java.util.Date;

import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.DateTimeUtil.DateUnit;

import org.junit.Test;

public class DateTimeUtilTest {

	@Test
	public void testGetCurrentTimestamp() {
		fail("Not yet implemented");
	}

	@Test
	public void testGetCurrentDate() {
		fail("Not yet implemented");
	}

	@Test
	public void testGetCurrentSqlDate() {
		System.out.println(DateTimeUtil.getCurrentSqlDate());
	}

	@Test
	public void testToTimestamp() {
		fail("Not yet implemented");
	}

	@Test
	public void testToDate() {
		fail("Not yet implemented");
	}

	@Test
	public void testToSqlDate() {
		fail("Not yet implemented");
	}

	@Test
	public void testToStringDateString() {
		fail("Not yet implemented");
	}

	@Test
	public void testToSqlString() {
		System.out.println(DateTimeUtil.getCurrentDate());
		System.out.println(DateTimeUtil.toString(DateTimeUtil.getCurrentDate(), DateTimeFormat.yyyyMMddHHmmssSSS_hyphen));
		System.out.println(DateTimeUtil.getCurrentSqlDate());
		System.out.println(DateTimeUtil.toString(DateTimeUtil.getCurrentSqlDate(), DateTimeFormat.yyyyMMddHHmmssSSS_hyphen));
	}

	@Test
	public void testTimeLagToInt() {
		fail("Not yet implemented");
	}

	@Test
	public void testSqlTimeLagToInt() {
		fail("Not yet implemented");
	}

	@Test
	public void testTimeLagToLong() {
		fail("Not yet implemented");
	}

	@Test
	public void testSqlTimeLagToLong() {
		fail("Not yet implemented");
	}

	@Test
	public void testDateToSqlDate() {
		java.util.Date dt = DateTimeUtil.getCurrentDate();
		System.out.println(dt);
		System.out.println(DateTimeUtil.dateToSqlDate(dt));
	}

	@Test
	public void testSqlDateToDate() {
		fail("Not yet implemented");
	}

	@Test
	public void testAdd() {
		Date dt = DateTimeUtil.getCurrentDate();
		System.out.println(DateTimeUtil.toString(dt, DateTimeFormat.HHmmssSSS_colon));
		dt = DateTimeUtil.add(dt, DateUnit.Millisecond, 150);
		System.out.println(DateTimeUtil.toString(dt, DateTimeFormat.HHmmssSSS_colon));
		assertTrue(true);
	}
}