Examples of QuotationProperties


Examples of cl.molavec.jpa.entities.QuotationProperties

    @Test
    public void insertDummyData()  {
     
      //Entities
      QuotationProperties qp = null;
    QUser quser = null;
    Customer customer = null;
    Company company = null;
    Quotation quotation =null;
   
View Full Code Here

Examples of cl.molavec.jpa.entities.QuotationProperties

     * @return
     * @throws MaxFileSizeException
     * @throws IOException
     */
    private QuotationProperties quotationPropertiesFactory() throws IOException, MaxFileSizeException {
      QuotationProperties qp = new QuotationProperties();
      qp.setLogo("resources"+File.separator+"logo.PNG");
      qp.setXSLFile("resources"+File.separator+"quotation.xsl");
      return qp;
    }
View Full Code Here

Examples of cl.molavec.jpa.entities.QuotationProperties

  public void test() {
   
    EntityManager em = this.emf.createEntityManager();
    em.getTransaction().begin();
   
    QuotationProperties qp = new QuotationProperties();
   
   
      try {
      qp.setLogo(LOGO_FILE);
    } catch (IOException | MaxFileSizeException e) {
      Assert.fail(e.getMessage());
    }
     
    try {
      qp.setXSLFile(XSL_FILE);
    } catch (MaxFileSizeException | IOException e) {
      Assert.fail(e.getMessage());
    }
   
    em.persist(qp);
   
      try {
        Assert.assertArrayEquals(IOUtils.toByteArray(new FileInputStream(new File(LOGO_FILE))), qp.getLogo());
        Assert.assertArrayEquals(IOUtils.toCharArray(new FileInputStream(new File(XSL_FILE))), qp.getXSL());
    } catch (IOException e) {
      Assert.fail(e.getMessage());
    }
   
      try {
      System.out.println("Extracted logo file from DB generated in... "+qp.getLogoFile().getAbsoluteFile());
      System.out.println("Extracted xsl file from DB generated in... "+qp.getXSLFile().getAbsoluteFile());
    } catch (IOException e) {
      Assert.fail(e.getMessage());
    }
     
      em.getTransaction().commit();
View Full Code Here
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.