Search in sources :

Example 1 with RemoveKeyInputBuilder

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());
}
Also used : RemoveKeyInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.RemoveKeyInputBuilder) RemoveKeyInput(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.RemoveKeyInput) Test(org.junit.Test)

Example 2 with RemoveKeyInputBuilder

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();
}
Also used : RemoveKeyInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.RemoveKeyInputBuilder)

Example 3 with RemoveKeyInputBuilder

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);
}
Also used : RemoveKeyInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.RemoveKeyInputBuilder) RemoveKeyInput(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.RemoveKeyInput) Test(org.junit.Test)

Example 4 with RemoveKeyInputBuilder

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());
}
Also used : RemoveKeyInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.RemoveKeyInputBuilder) RpcResult(org.opendaylight.yangtools.yang.common.RpcResult) RemoveKeyInput(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.RemoveKeyInput) Test(org.junit.Test)

Aggregations

RemoveKeyInputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.RemoveKeyInputBuilder)4 Test (org.junit.Test)3 RemoveKeyInput (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.RemoveKeyInput)3 RpcResult (org.opendaylight.yangtools.yang.common.RpcResult)1