android - what is the difference between Robolectric.setupActivity() and Robolectric.buildActivity()? -


i new robolectric ,please me understand , difference between these

loginactivity = new loginactivity(); loginactivity = robolectric.setupactivity(loginactivity.class); loginactivity = robolectric.buildactivity(loginactivity.class).create().start().resume().get();

you should take @ implementation of setup method. after following call hierarchy find following lines

robolectric class method setup()

return activitycontroller.of(shadowsadapter, activityclass).setup().get();  

activitycontroller class method setup()

return create().start().postcreate(null).resume().visible(); 

no can compare custom call chain chain setup method. here code: https://github.com/robolectric/robolectric/blob/770f4bc5a95a58ea1cd1238e4b1d51977b1bb17a/robolectric/src/main/java/org/robolectric/util/activitycontroller.java#l210


Comments

Popular posts from this blog

java - Ebean enhancement ignores a model -

ubuntu - How to disable Kernel Module Signing in linux -

SQL php on different pages to Insert (mysqli) -