Search in sources :

Example 1 with AddLspArgs

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev200120.AddLspArgs in project bgpcep by opendaylight.

the class TopologyProgrammingTest method testSubmitAddLsp.

@Test
public void testSubmitAddLsp() {
    final var captor = ArgumentCaptor.forClass(AddLspArgs.class);
    doReturn(Futures.immediateFuture(Optional.empty())).when(listener).addLsp(captor.capture());
    topologyProgramming.submitAddLsp(new SubmitAddLspInputBuilder().setName(NAME).setNode(nodeId).setArguments(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev200120.add.lsp.args.ArgumentsBuilder().build()).build());
    final var addLspArgs = captor.getValue();
    assertNotNull(addLspArgs);
    assertEquals(NAME, addLspArgs.getName());
    assertEquals(nodeId, addLspArgs.getNode());
}
Also used : Mockito.doReturn(org.mockito.Mockito.doReturn) SubmitAddLspInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.programming.rev181109.SubmitAddLspInputBuilder) ArgumentsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev200120.ensure.lsp.operational.args.ArgumentsBuilder) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 Mockito.doReturn (org.mockito.Mockito.doReturn)1 SubmitAddLspInputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.programming.rev181109.SubmitAddLspInputBuilder)1 ArgumentsBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev200120.ensure.lsp.operational.args.ArgumentsBuilder)1