package com.szpg.db.test; import static org.junit.Assert.assertEquals; import java.util.Calendar; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import com.szpg.db.dao.PgCh4Dao; import com.szpg.db.dao.impl.PgCh4DaoImpl; import com.szpg.util.TimeFormat; public class PgCH4DaoTest { private PgCh4Dao dao; @Before public void setUp() throws Exception { dao = new PgCh4DaoImpl(); } // @Test public void testAddParamRecord() { assertEquals(1, dao.addPblzRecord((float) 35.5, TimeFormat.formatTimestamp(Calendar.getInstance().getTime()), 1)); } @Test public void testFindAllParam() { assertEquals("20180115131918", dao.findAllPblz().get(0).getTmStrGB()); } @Test public void testFindParamById() { Assert.assertEquals(dao.findPblzById(1).getTmStrGB(), "20180115131918"); } }