timozattol / project-radin

Project Radin is an expense management Android application that was build during EPFL's Software Engineering 2014 course.
2 stars 2 forks source link

Test UserStorageManager #163

Open CedricCook opened 9 years ago

CedricCook commented 9 years ago

Since StorageManager is parametrized, we can't test the class itself, we must test implementations of it, so testing UserStorageManager first.

CedricCook commented 9 years ago

@philemonf @radubanabic I'm trying to do testing that involves a call to an AsyncTask, with the execute() method. Since execute() is final, it can not be tested by Mockito. Do you have a good solution? (the ones I found online are big hacks that involve other mocking libraries, and seem to complicated to just return null when a method is executed)

radubanabic commented 9 years ago

The clean solution seems to be PowerMockito, but maybe you can avoid the need for mocking that class. Can you point to the test you are writing, so that we can give concrete feedback?