*/
@Override
public Object getDefaultValue() {
- return bits;
+ // FIXME: Return real bits.
+ return null;
}
/*
public final class StringType implements StringTypeDefinition, Immutable {
private static final QName NAME = BaseTypes.STRING_QNAME;
private static final SchemaPath PATH = SchemaPath.create(true, NAME);
- private static final String DEFAULT_VALUE = "";
+ private static final String DEFAULT_VALUE = null;
private static final String DESCRIPTION = "";
private static final String REFERENCE = "";
private final List<LengthConstraint> lengthStatements;
*/
package org.opendaylight.yangtools.yang.model.util;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+
+import java.util.Collections;
+import java.util.List;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.opendaylight.yangtools.yang.model.api.Status;
import org.opendaylight.yangtools.yang.model.api.type.BitsTypeDefinition;
-
-import java.util.Collections;
-import java.util.List;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-
public class BitsTypeTest {
@Mock
assertNotEquals("Description should not be null", null, bitsType.toString());
assertNotEquals("Reference is not null", null, bitsType.getReference());
assertEquals("BaseType should be null", null, bitsType.getBaseType());
- assertEquals("Default value should be list of bit", listBit, bitsType.getDefaultValue());
+ assertEquals("Default value should be null", null, bitsType.getDefaultValue());
assertEquals("getPath should equal schemaPath", schemaPath, bitsType.getPath());
assertEquals("Status should be CURRENT", Status.CURRENT, bitsType.getStatus());
assertEquals("Should be empty list", Collections.EMPTY_LIST, bitsType.getUnknownSchemaNodes());
*/
package org.opendaylight.yangtools.yang.model.util;
-import static org.junit.Assert.*;
-import org.opendaylight.yangtools.yang.model.api.SchemaPath;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
import java.sql.Types;
-import org.opendaylight.yangtools.yang.model.api.Status;
import org.junit.Before;
import org.junit.Test;
+import org.opendaylight.yangtools.yang.model.api.SchemaPath;
+import org.opendaylight.yangtools.yang.model.api.Status;
public class StringTypeTest {
@Test
public void testGetters() {
assertEquals(string.getUnits(), "");
- assertEquals(string.getDefaultValue(), "");
+ assertNull(string.getDefaultValue());
assertEquals(string.getDescription(), "");
assertEquals(string.getReference(), "");
assertEquals(string.getQName(), BaseTypes.STRING_QNAME);
@Override
public Object getDefaultValue() {
- return bits;
+ // FIXME: Should return real value
+ return null;
}
@Override
@Override
public Object getDefaultValue() {
- return false;
+ return null;
}
@Override
public static final String LOCAL_NAME = TypeUtils.STRING;
private static final QName QNAME = QName.create(YangConstants.RFC6020_YANG_MODULE, LOCAL_NAME);
private static final SchemaPath PATH = SchemaPath.create(true, QNAME);
- private static final String DEFAULT_VALUE = "";
private static final String DESCRIPTION = "The string built-in type represents human-readable strings in YANG. "
+ "Legal characters are tab, carriage return, line feed, and the legal "
+ "characters of Unicode and ISO/IEC 10646";
@Override
public Object getDefaultValue() {
- return DEFAULT_VALUE;
+ return null;
}
@Override
builder.append(QNAME);
builder.append(", path=");
builder.append(PATH);
- builder.append(", defaultValue=");
- builder.append(DEFAULT_VALUE);
+ builder.append(", defaultValue=null");
builder.append(", description=");
builder.append(DESCRIPTION);
builder.append(", reference=");
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
+
import java.util.List;
import org.junit.Before;
import org.junit.Test;
assertFalse(bitsEff.equals("test"));
assertTrue(bitsEff.equals(bitsEffSecond));
assertEquals(3, bitsEff.getBits().size());
- assertEquals(3, ((List<?>) bitsEff.getDefaultValue()).size());
+ assertNull(bitsEff.getDefaultValue());
assertNotNull(bitEff.getPath());
assertNotNull(bitEff.getUnknownSchemaNodes());
assertNull(booleanEff.getBaseType());
assertEquals("", booleanEff.getUnits());
- assertTrue(booleanEff.getDefaultValue().equals(false));
+ assertNull(booleanEff.getDefaultValue());
assertEquals("boolean", booleanEff.getQName().getLocalName());
assertNull(booleanEff.getPath().getParent().getParent());
assertNotNull(booleanEff.getUnknownSchemaNodes());
assertEquals("string", stringEff.getQName().getLocalName());
assertEquals("CURRENT", stringEff.getStatus().toString());
assertEquals("", stringEff.getUnits());
- assertEquals("", stringEff.getDefaultValue());
+ assertNull(stringEff.getDefaultValue());
assertNotNull(stringEff.getUnknownSchemaNodes());
assertNull(stringEff.getBaseType());
assertNotNull(stringEff.getDescription());