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

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -