Search in sources :

Example 1 with DOMService

use of org.opendaylight.mdsal.dom.api.DOMService in project mdsal by opendaylight.

the class SimpleDOMMountPointTest method basicTest.

@Test
public void basicTest() throws Exception {
    final YangInstanceIdentifier yangInstanceIdentifier = mock(YangInstanceIdentifier.class);
    final DOMService domService = mock(DOMService.class);
    final ClassToInstanceMap<DOMService> classToInstanceMap = ImmutableClassToInstanceMap.<DOMService>builder().put(DOMService.class, domService).build();
    final SimpleDOMMountPoint simpleDOMMountPoint = SimpleDOMMountPoint.create(yangInstanceIdentifier, classToInstanceMap);
    assertNotNull(simpleDOMMountPoint);
    assertEquals(yangInstanceIdentifier, simpleDOMMountPoint.getIdentifier());
    assertTrue(simpleDOMMountPoint.getService(DOMService.class).isPresent());
    assertEquals(domService, simpleDOMMountPoint.getService(DOMService.class).get());
}
Also used : DOMService(org.opendaylight.mdsal.dom.api.DOMService) YangInstanceIdentifier(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 DOMService (org.opendaylight.mdsal.dom.api.DOMService)1 YangInstanceIdentifier (org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier)1