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");
}
精彩评论