use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.RemoveKeyInputBuilder in project lispflowmapping by opendaylight.
the class SubnetDataProcessorTest method deleteTest.
/**
* Tests {@link SubnetDataProcessor#delete} method.
*/
@Test
public void deleteTest() throws ExecutionException, InterruptedException {
final RemoveKeyInput removeKeyInput = new RemoveKeyInputBuilder().setEid(EID).build();
commonStubbing();
Mockito.when(odlMappingserviceServiceMock.removeKey(removeKeyInput)).thenReturn(future);
subnetDataProcessor.delete(subnet);
assertEquals(true, rpcResult.isSuccessful());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.RemoveKeyInputBuilder in project lispflowmapping by opendaylight.
the class LispUtil method buildRemoveKeyInput.
public static RemoveKeyInput buildRemoveKeyInput(Eid eid) {
RemoveKeyInputBuilder kib = new RemoveKeyInputBuilder();
kib.setEid(eid);
return kib.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.RemoveKeyInputBuilder in project lispflowmapping by opendaylight.
the class LispUtilTest method buildRemoveKeyInputTest.
/**
* Tests {@link LispUtil#buildRemoveKeyInput} method.
*/
@Test
public void buildRemoveKeyInputTest() {
final RemoveKeyInput expectedResult = new RemoveKeyInputBuilder().setEid(EID).build();
final RemoveKeyInput result = LispUtil.buildRemoveKeyInput(EID);
assertEquals(expectedResult, result);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.RemoveKeyInputBuilder in project lispflowmapping by opendaylight.
the class MappingServiceTest method removeKeyTest.
/**
* Tests {@link MappingService#removeKey} method.
*/
@Test
public void removeKeyTest() throws ExecutionException, InterruptedException {
final RemoveKeyInput removeKeyInput = new RemoveKeyInputBuilder().setEid(IPV4_EID).build();
final Future<RpcResult<Void>> result = mappingService.removeKey(removeKeyInput);
Mockito.verify(dsbe).removeAuthenticationKey(RPCInputConvertorUtil.toAuthenticationKey(removeKeyInput));
assertEquals(RPC_RESULT_SUCCESS.getErrors(), result.get().getErrors());
assertEquals(RPC_RESULT_SUCCESS.getResult(), result.get().getResult());
assertEquals(RPC_RESULT_SUCCESS.isSuccessful(), result.get().isSuccessful());
}
Aggregations