Redhuan D. Oon 2010-02-27 02:29:28 +00:00
parent 0da2f340e7
commit d0fcc6068a
1 changed files with 12 additions and 2 deletions

View File

@ -1,18 +1,21 @@
//MProductTest.java
package test.functional;
import java.math.BigDecimal;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.compiere.model.MProduct;
import org.compiere.model.MProductPricing;
import org.compiere.model.X_I_Product;
import org.compiere.util.DB;
import org.compiere.util.Env;
import test.AdempiereTestCase;
public class MProductTest extends AdempiereTestCase {
/*
public int getProduct_Category_ID(String productCategory) {
String sql = "select m_product_category_id from m_product_category where name = ?";
PreparedStatement pstmt = null;
@ -90,5 +93,12 @@ public class MProductTest extends AdempiereTestCase {
boolean saveResult = m_product.save();
assertEquals("Create new product.", true, saveResult);
} */
public void testSetBaseInfo() {
MProductPricing prodprice = new MProductPricing(122,100, new BigDecimal (100),true);
int uom = 0;
uom = prodprice.getC_UOM_ID();
assertTrue("UOM must be correct", uom == 100);
}
}