use of org.apache.jackrabbit.oak.api.AuthInfo in project jackrabbit-oak by apache.
the class ContentRemoteSessionTest method testReadRevisionAsString.
@Test
public void testReadRevisionAsString() {
Root root = mock(Root.class);
AuthInfo authInfo = mock(AuthInfo.class);
ContentSession session = mock(ContentSession.class);
doReturn(authInfo).when(session).getAuthInfo();
ContentRemoteRevisions revisions = mock(ContentRemoteRevisions.class);
doReturn(root).when(revisions).get(authInfo, "id");
assertEquals("id", createSession(session, revisions).readRevision("id").asString());
}
use of org.apache.jackrabbit.oak.api.AuthInfo in project jackrabbit-oak by apache.
the class ContentRemoteSessionTest method testReadRevision.
@Test
public void testReadRevision() {
Root root = mock(Root.class);
AuthInfo authInfo = mock(AuthInfo.class);
ContentSession session = mock(ContentSession.class);
doReturn(authInfo).when(session).getAuthInfo();
ContentRemoteRevisions revisions = mock(ContentRemoteRevisions.class);
doReturn(root).when(revisions).get(authInfo, "id");
assertNotNull(createSession(session, revisions).readRevision("id"));
}
Aggregations