Package org.netbeans.modules.exceptions.entity

Examples of org.netbeans.modules.exceptions.entity.Report


        setUpSubmit(result);
        return result;
    }

    private void setUpSubmit(Submit result){
        Report report = new Report(result.getId());
        result.setReportId(report);
        report.setComponent("web");
        report.setSubcomponent("jsp editor");
        result.setReportdate(new Date());
        em.persist(report);
        em.persist(result);
    }
View Full Code Here


        FileOutputStream fos = new FileOutputStream(lf.getNPSFile());
        fos.write("Hallo World!".getBytes());
        fos.close();

        Report r = new Report(i);
        r.setComponent("ide");
        r.setSubcomponent("Code");
        em.persist(r);
        Submit sbm;
        if (isSlowness) {
            Method m = new Method(i);
            m.setName("test" + i);
View Full Code Here

    @Test
    public void testMergeReportsWithOneIssueId() {
        EntityManager em = perUtils.createEntityManager();
        em.getTransaction().begin();
        Report r1 = new Report(1);
        Report r2 = new Report(2);
        Report r3 = new Report(3);
        Exceptions exc1 = new Exceptions(1);
        Exceptions exc2 = new Exceptions(2);
        Exceptions exc3 = new Exceptions(3);
        exc1.setReportId(r1);
        exc2.setReportId(r2);
        exc3.setReportId(r3);
        r1.setIssueId(ISSUE_ID);
        r2.setIssueId(ISSUE_ID);
        r3.setIssueId(ISSUE_ID);
        em.persist(r1);
        em.persist(r2);
        em.persist(r3);
        em.persist(exc1);
        em.persist(exc2);
View Full Code Here

    public void testUpdateMappings() {
        BugzillaConnector.setTestInstance(new TestBZConnector());
        EntityManager em = perUtils.createEntityManager();
        em.getTransaction().begin();
        Report r = new Report(146285);
        r.setIssueId(null);
        em.persist(r);
        r = new Report(146264);
        r.setIssueId(100);
        em.persist(r);
        r = new Report(2081);
        r.setIssueId(157884);
        em.persist(r);

        em.getTransaction().commit();
        em.close();
View Full Code Here

    public void testCleanInTransfer(){
        SynchronizeIssues is = new SynchronizeIssues();
        BugzillaConnector.setTestInstance(new TestBZConnector());
        EntityManager em = perUtils.createEntityManager();
        em.getTransaction().begin();
        Report r = new Report(146285);
        r.setIssueId(null);
        r.setIssuezillaTransfer(true);
        em.persist(r);
        r = new Report(146264);
        r.setIssueId(1214);
        r.setIssuezillaTransfer(true);
        em.persist(r);
        r = new Report(500);
        r.setIssueId(null);
        r.setIssuezillaTransfer(true);
        em.persist(r);
        em.getTransaction().commit();
        em.close();

        is.updateInTransferReports();
View Full Code Here

        assertEquals("EXCEPTION STATUS", new Integer(10), Report.Status.getInteger(set));
       
       
        System.out.println("testInsertExceptions");
        Exceptions exc = new Exceptions();
        Report report = new Report();
        report.setId(1);
        exc.setId(1);
        exc.setSummary(summarys[0]);
        report.setComponent("comp1");
        report.setSubcomponent("subcomp1");
        exc.setReportId(report);
       
        Comment comment = new Comment();
        comment.setComment("comment 1");
       
        persUtil.persist(report);
        persUtil.persist(exc);
       
        exc = new Exceptions();
        report = new Report();
        report.setId(2);
        exc.setId(2);
        exc.setSummary(summarys[1]);
        report.setComponent("comp1");
        report.setSubcomponent("subcomp1");
        exc.setReportId(report);
        comment = new Comment();
        comment.generateId();
        comment.setComment("comment 2");
       
        persUtil.persist(report);
        persUtil.persist(exc);
       
        exc = new Exceptions();
        report = new Report();
        report.setId(3);
        exc.setId(new Integer(3));
        exc.setSummary(summarys[2]);
        report.setComponent("comp2");
        report.setSubcomponent("subcomp2");
        exc.setReportId(report);
        comment = new Comment();
        comment.setComment("comment 3");
        comment.generateId();
        persUtil.persist(report);
View Full Code Here

   
    public void testFindExceptionCandidates(){
        String mainSummary = "SUMMARY";
        String secondSummary = "SECOND SUMMARY";
        Exceptions except = new Exceptions();
        Report report = new Report(5);
        except.setReportId(report);
        report.setIssueId(0);
        except.setId(5);
        except.setSummary(mainSummary);
        persUtil.persist(report);
        persUtil.persist(except);
        for (int i = 0; i < 9; i++){
View Full Code Here

        MockServices.setServices(LogReporter.class);
        EntityManager em = persUtil.createEntityManager();
        em.getTransaction().begin();

        Exceptions exc = new Exceptions(100);
        Report report = new Report(100);
        exc.setReportId(report);
        assertTrue(PersistenceUtils.exceptionIsOpen(exc));

        report.setIssueId(0);
        assertTrue(PersistenceUtils.exceptionIsOpen(exc));

        Issue issue = BugReporterFactory.getDefaultReporter().getIssue(10);
        report.setIssueId(issue.getId());
        em.persist(report);
        em.persist(exc);
        assertTrue(PersistenceUtils.exceptionIsOpen(exc));

        issue.setIssueStatus("RESOLVED");
View Full Code Here

        addNext(5, true, 5);//ID 6
        //
        EntityManager em = perUtils.createEntityManager();
        em.getTransaction().begin();
        Exceptions exc6 = em.find(Exceptions.class, 6);
        Report r2 = new Report(Utils.getNextId(Report.class));
        em.persist(r2);
        exc6.setReportId(r2);
        em.merge(exc6);
        em.getTransaction().commit();
        em.close();
View Full Code Here

    }

    private void markReportFixed() {
        EntityManager em = perUtils.createEntityManager();
        em.getTransaction().begin();
        Report r = em.find(Exceptions.class, excData.getSubmitId()).getReportId();
        r.setIssueId(issueID);
        em.persist(r);
        em.getTransaction().commit();
        em.close();
    }
View Full Code Here

TOP

Related Classes of org.netbeans.modules.exceptions.entity.Report

Copyright © 2018 www.massapicom. 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.