Package org.netbeans.modules.exceptions.entity

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


        assertNotNull(result);
        assertEquals(0, result.size());
    }

    public void testMultipleComponents() {
        Submit e1 = createNewSubmit(1);
        Submit e2 = createNewSubmit(2);
        e2.getReportId().setComponent("openide");
        e2.getReportId().setSubcomponent("code");
        em.merge(e2);

        List<Submit> result = runQuery(Collections.singleton("openide"), Collections.<String>emptyList(), true);
        assertEquals(1, result.size());
        assertEquals(e2, result.get(0));
View Full Code Here


        result = runQuery(comps, Collections.singleton("jsp editor"), true);
        assertEquals(2, result.size());
    }

    public void testAllComponents() {
        Submit e1 = createNewSubmit(1);
        Submit e2 = createNewSubmit(2);
        e2.getReportId().setComponent("openide");
        e2.getReportId().setSubcomponent("code");
        em.merge(e2);

        List<Submit> result = runQuery(null, null, false);
        assertEquals(2, result.size());
    }
View Full Code Here

        List<Submit> result = runQuery(null, null, false);
        assertEquals(2, result.size());
    }

    public void testMultipleSubComponents() {
        Submit e1 = createNewSubmit(1);
        Submit e2 = createNewSubmit(2);
        e2.getReportId().setComponent("web");
        e2.getReportId().setSubcomponent("code");
        em.merge(e2);

        List<Submit> result = runQuery(Collections.singleton("web"), Collections.singleton("code"), false);
        assertEquals(1, result.size());
        assertEquals(e2, result.get(0));
View Full Code Here

        assertEquals(2, result.size());
    }

    public void testWithoutDates() throws Exception {
        createNewSubmit(1);
        Submit e2 = createNewSubmit(2);
        e2.getReportId().setComponent("openide");
        e2.getReportId().setSubcomponent("code");
        em.merge(e2);

        List<Submit> result = runQuery(0, 10, null, null, true, "both", "ALL", null, null, false);
        assertEquals(2, result.size());
    }
View Full Code Here

        List<Submit> result = runQuery(0, 10, null, null, true, "both", "ALL", null, null, false);
        assertEquals(2, result.size());
    }

    public void testDuplicatesCountWithoutDates() {
        Submit e1 = createNewSubmit();
        Submit e2 = createDuplicate(e1);

        List<Submit> result = runQuery(0, 10, previousMonth(), new Date(), true);
        assertNotNull(result);
        assertEquals(2, result.size());
        assertTrue(result.contains(e2));
View Full Code Here

        assertEquals("BOTH EXCS HAS 2 DUPLICATES", 2, result.size());
        assertEquals(e1, result.get(0));
    }

    private Submit createNewSubmit() {
        Submit result = createSubmit();
        setUpSubmit(result);
        return result;
    }
View Full Code Here

        setUpSubmit(result);
        return result;
    }

    private Submit createNewSubmit(int id) {
        Submit result = createSubmit(id);
        setUpSubmit(result);
        return result;
    }
View Full Code Here

        em.persist(report);
        em.persist(result);
    }

    private Submit createDuplicate(Submit root) {
        Submit duplicate = createSubmit();
        duplicate.setReportId(root.getReportId());
        duplicate.setReportdate(new Date());
        em.persist(duplicate);
        return duplicate;
    }
View Full Code Here

        return result;
    }

    public boolean areDuplicates(EntityManager em, int sbm1, int sbm2) {
        boolean result = false;
        Submit exc1 = em.find(Submit.class, sbm1);
        assert exc1 != null;
        assert exc1.getReportId() != null;
        Submit exc2 = em.find(Submit.class, sbm2);
        assert exc2 != null;
        assert exc2.getReportId() != null;
        result = exc1.getReportId().getId() == exc2.getReportId().getId();
        return result;
    }
View Full Code Here

    private synchronized  IssuezillaInsertionRequest doStart(EntityManager em, InsertionResult result){
        if (sbm.getReportId().inIssuezillaTransfer() && InsertionResult.INSERT.equals(result)){
            return null;
        }
        sbm.getReportId().setIssuezillaTransfer(true);
        Submit mergedSbm = em.merge(sbm);
        return new IssuezillaInsertionRequest(userToken, mergedSbm, result, extraMessage, extraCC);
    }
View Full Code Here

TOP

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

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.