import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
-import java.io.IOException;
import java.util.List;
import org.junit.Test;
import org.opendaylight.mdsal.binding.generator.api.BindingGenerator;
-import org.opendaylight.mdsal.binding.generator.impl.BindingGeneratorImpl;
import org.opendaylight.mdsal.binding.model.api.GeneratedProperty;
import org.opendaylight.mdsal.binding.model.api.GeneratedTransferObject;
import org.opendaylight.mdsal.binding.model.api.GeneratedType;
import org.opendaylight.mdsal.binding.model.api.MethodSignature;
import org.opendaylight.mdsal.binding.model.api.Type;
+import org.opendaylight.yangtools.yang.binding.BindingMapping;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
-import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
-import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
public class AugmentRelativeXPathTest extends AbstractTypesTest {
}
@Test
- public void AugmentationWithRelativeXPathTest() throws IOException, SourceException, ReactorException {
+ public void AugmentationWithRelativeXPathTest() {
final SchemaContext context = YangParserTestUtils.parseYangFiles(testModels);
assertNotNull("context is null", context);
- final BindingGenerator bindingGen = new BindingGeneratorImpl(true);
+ final BindingGenerator bindingGen = new BindingGeneratorImpl();
final List<Type> genTypes = bindingGen.generateTypes(context);
assertNotNull("genTypes is null", genTypes);
assertNotNull("Interface methods are null", gtInterfaceMethods);
MethodSignature getIfcKeyMethod = null;
for (final MethodSignature method : gtInterfaceMethods) {
- if (method.getName().equals("getKey")) {
+ if (BindingMapping.IDENTIFIABLE_KEY_NAME.equals(method.getName())) {
getIfcKeyMethod = method;
break;
}
assertNotNull("Tunnel methods are null", tunnelMethods);
MethodSignature getTunnelKeyMethod = null;
for (MethodSignature method : tunnelMethods) {
- if (method.getName().equals("getKey")) {
+ if (BindingMapping.IDENTIFIABLE_KEY_NAME.equals(method.getName())) {
getTunnelKeyMethod = method;
break;
}