package jp.agentec.abook.abv.bl.logic;

import jp.agentec.abook.abv.bl.common.db.SQLiteOpenHelper;
import jp.agentec.abook.abv.bl.common.db.impl.JDBCSQLiteOpenHelper;
import jp.agentec.abook.abv.bl.data.DBConnector;
import junit.framework.TestCase;

public class ContentObjectLogLogicTest extends TestCase {

	private ContentObjectLogLogic logic = AbstractLogic.getLogic(ContentObjectLogLogic.class);

	@Override
	protected void setUp() throws Exception {
		super.setUp();

		DBConnector conn = DBConnector.getInstance();
		SQLiteOpenHelper sqlLiteOpenHelper = new JDBCSQLiteOpenHelper("test.db", 0);
		conn.setSqlLiteOpenHelper(sqlLiteOpenHelper);
		((JDBCSQLiteOpenHelper) sqlLiteOpenHelper).onCreate(conn.getDatabase());
	}

	@Override
	protected void tearDown() throws Exception {
		super.tearDown();
	}

	public void testGetContentObjectLogJson(){
		System.out.println(logic.getContentObjectLogJson(2439, 1));
	}
	
	public void testUpdtaeActionTime(){
		logic.updateActionTime(3, 3000);
	}
}
