playframework 2.0 - What is Play 2.0 FakeApplication's url address -
in functional test, actual address fakeapplication()?
@test public void findbyid() { running(fakeapplication(), new runnable() { public void run() { computer macintosh = computer.find.byid(21l); assertthat(macintosh.name).isequalto("macintosh"); assertthat(formatted(macintosh.introduced)).isequalto("1984-01-24"); } }); } edit
andy's answers works me.
@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, if need url should use fakeserver instead of fakeapplication
Comments
Post a Comment