Search in sources :

Example 1 with UpdateMappingInput

use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.UpdateMappingInput in project lispflowmapping by opendaylight.

the class MappingServiceTest method updateMappingTest.

/**
 * Tests {@link MappingService#updateMapping} method.
 */
@Test
public void updateMappingTest() throws ExecutionException, InterruptedException {
    final MappingRecord mappingRecord = getDefaultMappingRecordBuilder().build();
    final UpdateMappingInput updateMappingInput = new UpdateMappingInputBuilder().setMappingRecord(mappingRecord).build();
    final Future<RpcResult<Void>> result = mappingService.updateMapping(updateMappingInput);
    Mockito.verify(dsbe).updateMapping(RPCInputConvertorUtil.toMapping(updateMappingInput));
    assertEquals(RPC_RESULT_SUCCESS.getErrors(), result.get().getErrors());
    assertEquals(RPC_RESULT_SUCCESS.getResult(), result.get().getResult());
    assertEquals(RPC_RESULT_SUCCESS.isSuccessful(), result.get().isSuccessful());
}
Also used : MappingRecord(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping.record.container.MappingRecord) UpdateMappingInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.UpdateMappingInputBuilder) UpdateMappingInput(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.UpdateMappingInput) RpcResult(org.opendaylight.yangtools.yang.common.RpcResult) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 MappingRecord (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping.record.container.MappingRecord)1 UpdateMappingInput (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.UpdateMappingInput)1 UpdateMappingInputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.UpdateMappingInputBuilder)1 RpcResult (org.opendaylight.yangtools.yang.common.RpcResult)1