*/
package org.opendaylight.controller.sal.binding.generator.impl;
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
import org.junit.Test;
import org.opendaylight.controller.binding.generator.util.ReferencedTypeImpl;
import org.opendaylight.controller.sal.binding.generator.api.BindingGenerator;
import org.opendaylight.controller.yang.model.parser.api.YangModelParser;
import org.opendaylight.controller.yang.parser.impl.YangParserImpl;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
public class GenEnumResolvingTest {
private SchemaContext resolveSchemaContextFromFiles(
Enumeration linkUpDownTrapEnable = null;
Enumeration operStatus = null;
- final List<Enumeration> enums = genInterface.getEnumDefintions();
+ final List<Enumeration> enums = genInterface.getEnumerations();
assertNotNull("Generated Type Interface cannot contain NULL reference" +
" to Enumeration types!", enums);
assertEquals("Generated Type Interface MUST contain 2 Enumeration " +
assertNotNull("Generated Interface cannot contain NULL reference for " +
"Method Signature Definitions!", methods);
- assertEquals("Expected count of method signature definitions is 26",
- 26, methods.size());
+ assertEquals("Expected count of method signature definitions is 21",
+ 21, methods.size());
Enumeration ianaIfType = null;
for (final MethodSignature method : methods) {
if (method.getName().equals("getType")) {
final List<MethodSignature> methods = genInterface.getMethodDefinitions();
assertNotNull("Generated Type Interface cannot contain NULL reference" +
" to Enumeration types!", methods);
- assertEquals("Generated Type Interface MUST contain 7 Methods ",
- 7, methods.size());
+ assertEquals("Generated Type Interface MUST contain 4 Methods ",
+ 4, methods.size());
for (final MethodSignature method : methods) {
if (method.getName().equals("getLinkUpDownTrapEnable")) {
linkUpDownTrapEnable = method.getReturnType();