Search in sources :

Example 1 with RemoveMappingInputBuilder

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

the class MappingServiceTest method removeMappingTest.

/**
 * Tests {@link MappingService#removeMapping} method.
 */
@Test
public void removeMappingTest() throws ExecutionException, InterruptedException {
    final RemoveMappingInput removeMappingInput = new RemoveMappingInputBuilder().setEid(IPV4_EID).build();
    final Future<RpcResult<Void>> result = mappingService.removeMapping(removeMappingInput);
    Mockito.verify(dsbe).removeMapping(RPCInputConvertorUtil.toMapping(removeMappingInput));
    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 : RemoveMappingInput(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.RemoveMappingInput) RpcResult(org.opendaylight.yangtools.yang.common.RpcResult) RemoveMappingInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.RemoveMappingInputBuilder) Test(org.junit.Test)

Example 2 with RemoveMappingInputBuilder

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

the class LispUtil method buildRemoveMappingInput.

public static RemoveMappingInput buildRemoveMappingInput(Eid eid) {
    RemoveMappingInputBuilder rmib = new RemoveMappingInputBuilder();
    rmib.setEid(eid);
    return rmib.build();
}
Also used : RemoveMappingInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.RemoveMappingInputBuilder)

Example 3 with RemoveMappingInputBuilder

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

the class LispUtilTest method buildRemoveMappingInputTest.

/**
 * Tests {@link LispUtil#buildRemoveMappingInput} method.
 */
@Test
public void buildRemoveMappingInputTest() {
    final RemoveMappingInput expectedResult = new RemoveMappingInputBuilder().setEid(EID).build();
    final RemoveMappingInput result = LispUtil.buildRemoveMappingInput(EID);
    assertEquals(expectedResult, result);
}
Also used : RemoveMappingInput(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.RemoveMappingInput) RemoveMappingInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.RemoveMappingInputBuilder) Test(org.junit.Test)

Aggregations

RemoveMappingInputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.RemoveMappingInputBuilder)3 Test (org.junit.Test)2 RemoveMappingInput (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.RemoveMappingInput)2 RpcResult (org.opendaylight.yangtools.yang.common.RpcResult)1