Package org.rhq.core.domain.criteria

Examples of org.rhq.core.domain.criteria.GenericDriftCriteria


        MongoDBChangeSetEntry e2 = new MongoDBChangeSetEntry("c2-1.txt", FILE_ADDED);
        c1.add(e1);
        c1.add(e2);
        dao.save(c1);

        GenericDriftCriteria criteria = new GenericDriftCriteria();
        criteria.addFilterId(e2.getId());

        List<MongoDBChangeSetEntry> entries = dao.findEntries(criteria);
        assertEntriesMatch("Failed to find change set entries with id filter", asList(e2), entries);
    }
View Full Code Here


        MongoDBChangeSetEntry e4 = new MongoDBChangeSetEntry("c1-1.txt", FILE_CHANGED);
        MongoDBChangeSetEntry e5 = new MongoDBChangeSetEntry("c1-2.txt", FILE_REMOVED);
        c2.add(e3).add(e4).add(e5);
        dao.save(c2);

        GenericDriftCriteria criteria = new GenericDriftCriteria();
        criteria.addFilterCategories(FILE_CHANGED, FILE_REMOVED);

        List<MongoDBChangeSetEntry> entries = dao.findEntries(criteria);
        assertEntriesMatch("Failed to find change set entries with category filter", asList(e4, e5), entries);
    }
View Full Code Here

        MongoDBChangeSetEntry e2 = new MongoDBChangeSetEntry("c1-1.txt", FILE_CHANGED);
        c2.add(e2);

        dao.save(c2);

        GenericDriftCriteria criteria = new GenericDriftCriteria();
        criteria.addFilterResourceIds(resourceId);
        criteria.addFilterStartTime(startTime);

        List<MongoDBChangeSet> actual = dao.findByDriftCriteria(criteria);

        assertEquals(actual.size(), 1, "Expected to get back one change set");
        MongoDBChangeSet actualChangeSet = actual.get(0);
View Full Code Here

        MongoDBChangeSet c2 = createChangeSet(COVERAGE, 1, 2, 1);
        MongoDBChangeSetEntry e2 = new MongoDBChangeSetEntry("c2-1.txt", FILE_ADDED);
        c2.add(e2);
        dao.save(c2);

        GenericDriftCriteria criteria = new GenericDriftCriteria();
        criteria.addFilterChangeSetId(c2.getId());

        List<MongoDBChangeSetEntry> entries = dao.findEntries(criteria);
        assertEntriesMatch("Failed to find change set entries with change set id filter", asList(e2), entries);
    }
View Full Code Here

        MongoDBChangeSet c2 = createChangeSet(COVERAGE, 1, 2, 1);
        MongoDBChangeSetEntry e2 = new MongoDBChangeSetEntry("c2-1.txt", FILE_ADDED);
        c2.add(e2);
        dao.save(c2);

        GenericDriftCriteria criteria = new GenericDriftCriteria();
        criteria.addFilterResourceIds(1);

        List<MongoDBChangeSetEntry> entries = dao.findEntries(criteria);
        assertEntriesMatch("Failed to find change set entries with resource id filter", asList(e1), entries);
    }
View Full Code Here

        MongoDBChangeSetEntry e4 = new MongoDBChangeSetEntry("c1-1.txt", FILE_CHANGED);
        MongoDBChangeSetEntry e5 = new MongoDBChangeSetEntry("c1-2.txt", FILE_REMOVED);
        c3.add(e4).add(e5);
        dao.save(c3);

        GenericDriftCriteria criteria = new GenericDriftCriteria();
        criteria.addFilterResourceIds(1);
        criteria.addFilterCategories(FILE_ADDED, FILE_CHANGED);

        List<MongoDBChangeSetEntry> entries = dao.findEntries(criteria);
        assertEntriesMatch("Failed to find change set entries with resource id and category filters",
            asList(e1, e2, e4), entries);
    }
View Full Code Here

        MongoDBChangeSet c3 = createChangeSet(DRIFT, 2, 1, 1);
        MongoDBChangeSetEntry e3 = new MongoDBChangeSetEntry("c1-1.txt", FILE_CHANGED);
        c3.add(e3);
        dao.save(c3);

        GenericDriftCriteria criteria = new GenericDriftCriteria();
        criteria.addFilterStartTime(startTime);
        criteria.addFilterResourceIds(1);

        List<MongoDBChangeSetEntry> entries = dao.findEntries(criteria);
        assertEntriesMatch("Failed to find change set entries with resource id and start time filters", asList(e3),
            entries);
    }
View Full Code Here

        MongoDBChangeSet c3 = createChangeSet(DRIFT, 2, 1, 1);
        MongoDBChangeSetEntry e3 = new MongoDBChangeSetEntry("c1-1.txt", FILE_CHANGED);
        c3.add(e3);
        dao.save(c3);

        GenericDriftCriteria criteria = new GenericDriftCriteria();
        criteria.addFilterEndTime(endTime);
        criteria.addFilterResourceIds(1);

        List<MongoDBChangeSetEntry> entries = dao.findEntries(criteria);
        assertEntriesMatch("Failed to find change set entries with resource id and end time filters", asList(e1),
            entries);
    }
View Full Code Here

        MongoDBChangeSet c3 = createChangeSet(DRIFT, 3, 1, 1);
        MongoDBChangeSetEntry e3 = new MongoDBChangeSetEntry("c1-1.txt", FILE_CHANGED);
        c3.add(e3);
        dao.save(c3);

        GenericDriftCriteria criteria = new GenericDriftCriteria();
        criteria.addFilterDriftDefinitionId(1);
        criteria.addFilterChangeSetStartVersion(2);

        List<MongoDBChangeSetEntry> entries = dao.findEntries(criteria);
        assertEntriesMatch("Failed to find change set entries with change set start version filter", asList(e2, e3),
                entries);
    }
View Full Code Here

        MongoDBChangeSet c3 = createChangeSet(DRIFT, 3, 1, 1);
        MongoDBChangeSetEntry e3 = new MongoDBChangeSetEntry("c1-1.txt", FILE_CHANGED);
        c3.add(e3);
        dao.save(c3);

        GenericDriftCriteria criteria = new GenericDriftCriteria();
        criteria.addFilterDriftDefinitionId(1);
        criteria.addFilterChangeSetEndVersion(2);

        List<MongoDBChangeSetEntry> entries = dao.findEntries(criteria);
        assertEntriesMatch("Failed to find change set entries with change set end version filter", asList(e1, e2),
                entries);
    }
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.criteria.GenericDriftCriteria

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.