use of org.opendaylight.yangtools.yang.model.api.type.StringTypeDefinition in project controller by opendaylight.
the class RuntimeRegistratorTest method testHierarchy.
@Test
public void testHierarchy() {
final LeafSchemaNode leaf = mock(LeafSchemaNode.class);
doReturn(QName.create(URI.create("urn:x"), "leaf-local-name")).when(leaf).getQName();
doReturn(Collections.emptyList()).when(leaf).getUnknownSchemaNodes();
doReturn(java.util.Optional.empty()).when(leaf).getDescription();
final StringTypeDefinition leafType = mock(StringTypeDefinition.class);
doReturn(java.util.Optional.empty()).when(leafType).getDefaultValue();
doReturn(leafType).when(leaf).getType();
final TypeProviderWrapper typeProviderWrapper = mock(TypeProviderWrapper.class);
final Type mockedType = mock(Type.class);
doReturn(mockedType).when(typeProviderWrapper).getType(leaf);
doReturn("java.lang.String").when(mockedType).getFullyQualifiedName();
}
Aggregations