Search in sources :

Example 16 with CollectionRequest

use of com.linkedin.restli.common.CollectionRequest in project rest.li by linkedin.

the class TestRestClientRequestBuilder method buildInputForBatchPatchAndUpdate.

@SuppressWarnings({ "rawtypes", "deprecation" })
private void buildInputForBatchPatchAndUpdate(Request mockRequest) {
    CollectionRequest mockCollectionRequest = EasyMock.createMock(CollectionRequest.class);
    EasyMock.expect(mockCollectionRequest.getElements()).andReturn(Collections.emptyList()).once();
    EasyMock.expect(mockRequest.getInputRecord()).andReturn(mockCollectionRequest).times(2);
    EasyMock.replay(mockCollectionRequest);
    ResourceSpec resourceSpec = new ResourceSpecImpl(Collections.<ResourceMethod>emptySet(), Collections.<String, DynamicRecordMetadata>emptyMap(), Collections.<String, DynamicRecordMetadata>emptyMap(), null, null, null, EmptyRecord.class, Collections.<String, CompoundKey.TypeInfo>emptyMap());
    EasyMock.expect(mockRequest.getResourceProperties()).andReturn(new ResourcePropertiesImpl(Collections.<ResourceMethod>emptySet(), null, null, TypeSpec.forClassMaybeNull(EmptyRecord.class), Collections.<String, CompoundKey.TypeInfo>emptyMap())).once();
}
Also used : CollectionRequest(com.linkedin.restli.common.CollectionRequest) EmptyRecord(com.linkedin.restli.common.EmptyRecord) CompoundKey(com.linkedin.restli.common.CompoundKey) ResourcePropertiesImpl(com.linkedin.restli.internal.common.ResourcePropertiesImpl) ResourceSpec(com.linkedin.restli.common.ResourceSpec) ResourceSpecImpl(com.linkedin.restli.common.ResourceSpecImpl)

Aggregations

CollectionRequest (com.linkedin.restli.common.CollectionRequest)16 DataMap (com.linkedin.data.DataMap)7 TestRecord (com.linkedin.restli.client.test.TestRecord)7 Test (org.testng.annotations.Test)7 KeyValueRecord (com.linkedin.restli.common.KeyValueRecord)6 HashMap (java.util.HashMap)5 KeyValueRecordFactory (com.linkedin.restli.common.KeyValueRecordFactory)4 RecordTemplate (com.linkedin.data.template.RecordTemplate)3 PathSpec (com.linkedin.data.schema.PathSpec)2 CompoundKey (com.linkedin.restli.common.CompoundKey)2 ResourceProperties (com.linkedin.restli.common.ResourceProperties)2 Collection (java.util.Collection)2 HashSet (java.util.HashSet)2 Map (java.util.Map)2 ComplexResourceKey (com.linkedin.restli.common.ComplexResourceKey)1 EmptyRecord (com.linkedin.restli.common.EmptyRecord)1 PatchRequest (com.linkedin.restli.common.PatchRequest)1 ResourceSpec (com.linkedin.restli.common.ResourceSpec)1 ResourceSpecImpl (com.linkedin.restli.common.ResourceSpecImpl)1 ResourcePropertiesImpl (com.linkedin.restli.internal.common.ResourcePropertiesImpl)1