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

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -