Code example for ArrayList

Methods: add

0
        mockWebServer = new MockWebServer();
 
        spiceManager = new BitmapSpiceManagerUnderTest();
        spiceManager.start(getInstrumentation().getTargetContext());
 
        data = new ArrayList<DataUnderTest>();
 
        data1 = new DataUnderTest();
        data1.setFoo("data1");
        data1.setImageUrl("data1.png");
 
        data2 = new DataUnderTest();
        data2.setFoo("data2");
        data2.setImageUrl("data2.png");
 
        data.add(data1);
        data.add(data2);
        adapter = new SpiceArrayAdapterUnderTest(getInstrumentation().getTargetContext(), spiceManager, data);
    } 
 
    @Override 
    protected void tearDown() throws Exception { 
        mockWebServer.shutdown();