import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import com.google.common.io.ByteSource;
-
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.Collection;
import java.util.List;
import java.util.Set;
-
import org.junit.Test;
import org.opendaylight.yangtools.sal.binding.generator.api.BindingGenerator;
import org.opendaylight.yangtools.sal.binding.model.api.GeneratedProperty;
return ctx.getModules();
}
- private SchemaContext resolveSchemaContextFromFiles(final URI... yangFiles) throws IOException {
+ private static SchemaContext resolveSchemaContextFromFiles(final URI... yangFiles) throws IOException {
final YangContextParser parser = new YangParserImpl();
final List<File> inputFiles = new ArrayList<File>();
bindingGen.generateTypes(context);
fail("Expected IllegalArgumentException caused by invalid leafref path");
} catch (IllegalArgumentException e) {
- String expected = "Failed to find leafref target: ../id";
- assertEquals(expected, e.getMessage());
+ String expected = "Failed to find leafref target: ../id in module foo (QNameModule{ns=urn:yang.foo, rev=2014-03-10})";
+ assertTrue(e.getMessage().startsWith(expected));
}
}
-
}
\ No newline at end of file