package oss.ngocminh.lego.persistence;
import java.sql.SQLException;
import java.util.List;
import org.junit.Assert;
import org.junit.Test;
import oss.ngocminh.lego.data.Entity;
import oss.ngocminh.lego.persistence.ProductDAO;
public class ProductDAOTest extends AbstractDAOTest {
@Override
protected String getDataPath() {
return "products.xml";
}
@Test
public void testList() throws SQLException {
ProductDAO productDAO = new ProductDAO();
productDAO.setConnection(getSqlConnection());
List<Entity> entities = productDAO.list();
Assert.assertEquals(3, entities.size());
}
}