开发者

Fixtures.loadYaml in FunctionalTest didn't really load the data

I have the following functional test that setup the initial data via fixtures.loadYaml, but when I开发者_运维问答 query the records in testcase, I don't see them. Any reasons?

public class UsersTest extends FunctionalTest {
    @Before
    public void setup() {
        Fixtures.loadYaml("data.yml");
    }

    @Test
    public void testIndex() {
        ....
    }


Based on the documentation on latest release http://www.playframework.org/documentation/1.2.3/test, I instead called loadModels, and it worked.

@Before
public void setup() {
    Fixtures.deleteAllModels();
    Fixtures.loadModels("data.yml");
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜