brunodea / nevertoolate

It is Never Too Late to start all over again!
2 stars 1 forks source link

Unit Tests #2

Open manic-coder opened 6 years ago

manic-coder commented 6 years ago

Hi @brunodea !

I'm thinking to start with unit tests. Any suggestions as to how i should go about it?

brunodea commented 6 years ago

Hello @manic-coder, I don't know how much you know about testing, but here are some helpful links: https://developer.android.com/training/testing/unit-testing/local-unit-tests.html https://developer.android.com/training/testing/fundamentals.html

In this App, the Unit tests should be placed at app/src/test/java/br/brunodea/nevertoolate/.

If you want some ideas of what you could create Unit tests for, I'd think about checking the Util classes. I took a quick look over there and I think a good first candidate would be RedditUtils.queryGetMotivated(). Maybe you could even change this method to make it accept some kind of argument, like the minimum number of posts to fetch, or even change the do...while logic I use over there, I don't like it very much. xP

Anyway, thanks for your interest. If you need more support just let me know!

Note: be aware that I just changed the repo name to "nevertoolate", not sure if it will have some impact on you.