Test ArrayAdapter in Android -


i'm trying test custom arrayadapter , i'm having issues getting list appear

public class planofcarecheckboxadaptertest extends androidtestcase { planofcarecheckboxadapter madapter; list<string> values; context mcontext;  public planofcarecheckboxadaptertest() {     super(); }  @before public void setup() throws exception {     super.setup();      mcontext = new mockcontext();     new pocvalues(mcontext);      values = arrays.aslist("one", "two", "three");     madapter = new planofcarecheckboxadapter(mcontext, r.layout.item_multi_check, values, pocvalues.mastermap);     assertequals("two", madapter.getitem(0)); } 

my implementation:

public class planofcarecheckboxadapter extends arrayadapter<string>{ private bimap<integer, string> map; private set<integer> mpendingitems, mdoneitems; private boolean issuperuser;  public planofcarecheckboxadapter(context context, int resource, list objects, bimap<integer, string> mapping) {     super(context, resource, objects);      issuperuser = false;     mpendingitems = new hashset<>();     mdoneitems = new hashset<>();     map = mapping; } 

when run test actual result of null? why?


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -