Playframework 2.0 什么是Play 2.0 FakeApplication';用户的url地址
在功能测试中,fakeApplication()的实际地址是什么 编辑 安迪的答案对我很有用Playframework 2.0 什么是Play 2.0 FakeApplication';用户的url地址,playframework-2.0,Playframework 2.0,在功能测试中,fakeApplication()的实际地址是什么 编辑 安迪的答案对我很有用 @Test public void findById() { running(testServer(3333, fakeApplication(inMemoryDatabase())), new Runnable() { public void run() { HttpClient httpclient = new DefaultHttpClient(); HttpP
@Test
public void findById() {
running(testServer(3333, fakeApplication(inMemoryDatabase())), new Runnable() {
public void run() {
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://localhost:3333/endpoint");
}
});
}
AFAICT,如果您需要url,您应该使用FakeServer而不是FakeApplicationAFAICT,如果您需要url,您应该使用FakeServer而不是FakeApplication
@Test
public void findById() {
running(testServer(3333, fakeApplication(inMemoryDatabase())), new Runnable() {
public void run() {
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://localhost:3333/endpoint");
}
});
}