3
我想單元測試我的數據庫操作,我發現this code。但是,我得到以下錯誤:DdlGenerator構造函數不需要參數?
[CityGame] $ test
[info] Compiling 2 Java sources to /Users/pmichna/Documents/code/citygame/target/scala-2.10/test-classes...
[error] /Users/pmichna/Documents/code/citygame/test/models/BaseModelTest.java:31: error: constructor DdlGenerator in class DdlGenerator cannot be applied to given types;
[error] ddl = new DdlGenerator((SpiEbeanServer) server, new MySqlPlatform(), config);
[error] ^
[error] required: no arguments
[error] found: SpiEbeanServer,MySqlPlatform,ServerConfig
[error] reason: actual and formal argument lists differ in length
[error] 1 error
[error] (test:compile) javac returned nonzero exit code
[error] Total time: 2 s, completed 2013-12-17 00:21:23
是否已執行DdlGenerator
已更改?
謝謝!你在哪裏找到這些信息?我通過Ebean JacaDoc看了一眼,什麼都沒有...... – pmichna
我看了看遊戲的源代碼。它使用'DdlGenerator'來啓動演化腳本。看到這裏:https://github.com/playframework/playframework/blob/master/framework/src/play-java-ebean/src/main/java/play/db/ebean/EbeanPlugin.java#L114 – mguillermin