Package org.openengsb.core.api.model

Examples of org.openengsb.core.api.model.CommitQueryRequest


        ci = getEDBCommit();
        ci.setComment("this is a comment");
        ci.update(obj);
        Long timestamp2 = db.commit(ci);
        String revision2 = ci.getRevisionNumber().toString();
        CommitQueryRequest request = new CommitQueryRequest();
        request.setCommitter("wrongName");
        assertThat(db.getRevisionsOfMatchingCommits(request).size(), is(0));
        request = new CommitQueryRequest();
        request.setCommitter("wrongContext");
        assertThat(db.getRevisionsOfMatchingCommits(request).size(), is(0));

        request = new CommitQueryRequest();
        request.setStartTimestamp(timestamp1);
        List<CommitMetaInfo> revisions = db.getRevisionsOfMatchingCommits(request);
        assertThat(revisions.size(), is(2));
        assertThat(revisions.get(0).getRevision(), is(revision1));
        assertThat(revisions.get(1).getRevision(), is(revision2));
        request = new CommitQueryRequest();
        request.setStartTimestamp(timestamp1);
        request.setCommitter("testuser");
        revisions = db.getRevisionsOfMatchingCommits(request);
        assertThat(revisions.size(), is(2));
        assertThat(revisions.get(0).getRevision(), is(revision1));
        assertThat(revisions.get(1).getRevision(), is(revision2));
        request = new CommitQueryRequest();
        request.setStartTimestamp(timestamp2);

        revisions = db.getRevisionsOfMatchingCommits(request);
        assertThat(revisions.size(), is(1));
        assertThat(revisions.get(0).getRevision(), is(revision2));
        assertThat(revisions.get(0).getCommitter(), is(COMMITTER));
View Full Code Here

TOP

Related Classes of org.openengsb.core.api.model.CommitQueryRequest

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.