public void testLoadSaveRepository() throws
Exception {
Class.forName("org.h2.Driver").newInstance();
Connection theConnection = null;
try {
theConnection = DriverManager.getConnection("jdbc:h2:mem:dname", "sa", "");
Class theHibernateDialect = H2Dialect.class;
String theModelResource = "/de/erdesignerng/test/io/repository/examplemodel.mxm";
String theNewFile = RepositioryHelper.performRepositorySaveAndLoad(theModelResource, theHibernateDialect,
theConnection);
String theOriginalFile = IOUtils.toString(getClass().getResourceAsStream(theModelResource));
assertTrue(compareStrings(theOriginalFile, theNewFile));
} finally {
if (theConnection != null) {
theConnection.createStatement().execute("SHUTDOWN");
theConnection.close();
}
}
}
RepositoryIOTest.java 文件源码
java
阅读 34
收藏 0
点赞 0
评论 0
项目:ERDesignerNG
作者:
评论列表
文章目录