use of org.opendaylight.yangtools.yang.model.api.stmt.LeafEffectiveStatement in project yangtools by opendaylight.
the class EffectiveStatementTypeTest method testEmpty.
@Test
public void testEmpty() {
currentLeaf = (LeafSchemaNode) types.getDataChildByName(QName.create(types.getQNameModule(), "leaf-empty"));
assertNotNull(currentLeaf.getType());
final EmptyTypeDefinition emptyEff = (EmptyTypeDefinition) ((TypeEffectiveStatement<?>) ((LeafEffectiveStatement) currentLeaf).effectiveSubstatements().iterator().next()).getTypeDefinition();
assertEquals(Optional.empty(), emptyEff.getUnits());
assertEquals(Optional.empty(), emptyEff.getDefaultValue());
assertNull(emptyEff.getBaseType());
assertEquals("empty", emptyEff.getQName().getLocalName());
assertNotNull(emptyEff.getUnknownSchemaNodes());
assertEquals(Optional.empty(), emptyEff.getDescription());
assertEquals(Optional.empty(), emptyEff.getReference());
assertEquals("CURRENT", emptyEff.getStatus().toString());
assertNotNull(emptyEff.toString());
}
Aggregations