Пример #1
0
  @Test
  public void testDelete() {
    try {
      setUpProducts();
      Product product = pdt.setUpProduct1();

      ProductXml productXml =
          new ProductXml.ProductBuilder()
              .author(product.getAuthor())
              .imageURL(product.getImageURL())
              .imageLargeURL(product.getImageLargeURL())
              .manufacturer(product.getManufacturer())
              .productIndex(product.getProductIndex())
              .productgroup(product.getProductgroup())
              .productId(product.getProductId())
              .productidtype(product.getProductidtype())
              .source(product.getSource())
              .sourceid(product.getSourceid())
              .title(product.getTitle())
              .build();

      ProductMsgXml productMsg = new ProductMsgXml(productXml);
      ProductDaoSql productDaoSql = new ProductDaoSql(productMsg);
      productMsg = (ProductMsgXml) productDaoSql.delete();
      System.out.println(productMsg.getSuccess());
    } catch (Exception e) {
      e.printStackTrace();
    }
  }