use of org.apache.jackrabbit.oak.api.ResultRow in project jackrabbit-oak by apache.
the class ContentRemoteResultTest method testMultiLongColumn.
@Test
public void testMultiLongColumn() {
PropertyValue value = mock(PropertyValue.class);
doReturn(Type.LONGS).when(value).getType();
doReturn(asList(4L, 2L)).when(value).getValue(Type.LONGS);
ResultRow row = mock(ResultRow.class);
doReturn(value).when(row).getValue("column");
ContentRemoteResult result = createResult(row);
RemoteValue remoteValue = result.getColumnValue("column");
assertEquals(asList(4L, 2L), remoteValue.asMultiLong());
}
use of org.apache.jackrabbit.oak.api.ResultRow in project jackrabbit-oak by apache.
the class ContentRemoteResultTest method testMultiPathColumn.
@Test
public void testMultiPathColumn() {
PropertyValue value = mock(PropertyValue.class);
doReturn(Type.PATHS).when(value).getType();
doReturn(asList("a", "b")).when(value).getValue(Type.PATHS);
ResultRow row = mock(ResultRow.class);
doReturn(value).when(row).getValue("column");
ContentRemoteResult result = createResult(row);
RemoteValue remoteValue = result.getColumnValue("column");
assertEquals(asList("a", "b"), remoteValue.asMultiPath());
}
use of org.apache.jackrabbit.oak.api.ResultRow in project jackrabbit-oak by apache.
the class ContentRemoteResultTest method testMultiReferenceColumn.
@Test
public void testMultiReferenceColumn() {
PropertyValue value = mock(PropertyValue.class);
doReturn(Type.REFERENCES).when(value).getType();
doReturn(asList("a", "b")).when(value).getValue(Type.REFERENCES);
ResultRow row = mock(ResultRow.class);
doReturn(value).when(row).getValue("column");
ContentRemoteResult result = createResult(row);
RemoteValue remoteValue = result.getColumnValue("column");
assertEquals(asList("a", "b"), remoteValue.asMultiReference());
}
use of org.apache.jackrabbit.oak.api.ResultRow in project jackrabbit-oak by apache.
the class ContentRemoteResultTest method testPathColumn.
@Test
public void testPathColumn() {
PropertyValue value = mock(PropertyValue.class);
doReturn(Type.PATH).when(value).getType();
doReturn("value").when(value).getValue(Type.PATH);
ResultRow row = mock(ResultRow.class);
doReturn(value).when(row).getValue("column");
ContentRemoteResult result = createResult(row);
RemoteValue remoteValue = result.getColumnValue("column");
assertEquals("value", remoteValue.asPath());
}
use of org.apache.jackrabbit.oak.api.ResultRow in project jackrabbit-oak by apache.
the class ContentRemoteResultTest method testSelector.
@Test
public void testSelector() {
ResultRow row = mock(ResultRow.class);
doReturn("path").when(row).getPath("selector");
assertEquals("path", createResult(row).getSelectorPath("selector"));
}
Aggregations