Package oss.ngocminh.lego.persistence

Source Code of oss.ngocminh.lego.persistence.ProductDAOTest

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());
  }
 
}
TOP

Related Classes of oss.ngocminh.lego.persistence.ProductDAOTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.