コード例 #1
0
  @Test
  public void getLaborCostPSF() throws Exception {
    ProductDAOFileImpl testIt = new ProductDAOFileImpl();
    testIt.loadProductInfo();

    String s1 = "Wood";
    double result = testIt.getLaborCostPSF(s1);
    assertEquals(4.75, result, 0.001);
  }
コード例 #2
0
  @Test
  public void getProductTypes() throws Exception {
    ProductDAOFileImpl testIt = new ProductDAOFileImpl();
    testIt.loadProductInfo();

    ArrayList<String> test = new ArrayList<>();
    test.add("Carpet");
    test.add("Laminate");
    test.add("Tile");
    test.add("Wood");
    ArrayList<Product> result = testIt.getProductTypes();
    assertEquals(test, result);
  }
コード例 #3
0
 @BeforeClass
 public static void setUpClass() throws Exception {
   ProductDAOFileImpl testIt = new ProductDAOFileImpl();
   testIt.loadProductInfo();
 }