mardi 27 mars 2018

Writing Test Cases for androidTest Folder

public class DriveRepository {

    private List<Drive> driverList;

    public DriverRepository(Context context) {
        driverList = new ArrayList<>();
        driverList.add(Driver.create(context, "111", "H"));
        driverList.add(Driver.create(context, "12", "Ha"));
        driverList.add(Driver.create(context, "123", "K"));
        driverList.add(Driver.create(context, "1234", "A"));
    }

    public List<Driver> getDrivers() {
        return driverList;
    }
}

Can somebody please point out how to write androidTest case using JUNit for the above class. I tried searching but all i found was Espresso Eg, i can't use Mockito as i am writing instrumentation Test Case. Any help would be appreciated

Aucun commentaire:

Enregistrer un commentaire