HackerNews Android - Let's not crash

As discovered in our last session - Opening a lot of connections breaks things. The creation of the OkHttpClient is done in HackerNewsNetwork#getClient... ugg... A get. Ruthless refactoring! As I was saying; the creation is done in HackernewsNetwork#httpClient. private OkHttpClient httpClient() { return interceptorObj == null ? new OkHttpClient() : new OkHttpClient(…

HackerNews Android - Get a Job

The Top Stories apparently can include job postings. I have the StoryAdapter only accepting responses that have the type of "story". We need to build up a path for Jobs because it's in the payload. Well... mostly because it crashes the app when I scroll. Network…

VBM on Android - Top Stories Full Data

I've thought a bit about my TDD limitations on Android and my discovery of the GoLang-y nature of interfaces. For the TopStoriesAdapter.ViewHolder to be tested; we can create a wrapper for other controls... Now I understand why Android didn't do it originally; performance; TDD was…

VBM on Android - Top Stories Screen

OK - Looks like we've gotten to the point where building out a UI is gonna be a good next step. We need to know what we want to see to know what app innards to build up. Sure, sure "Top Stories"; but honestly, I have…

VBM on Android - Ruthless Refactoring

I was looking at the code today to see if I could use the new Moshi 1.4 [https://github.com/square/moshi/blob/master/CHANGELOG.md] and thought I should poke about to see if there's any obvious changes out the network layer I could/should change.…

VBM on Android - Unit Test in Espresso

Much like the post on Appium [https://quinngil.com/2017/02/12/vbm-on-android-initial-appium]; This Espresso post is tied to activities going on at work. This isn't published until long after a decision has been made; but it will serve as my learning so I can participate in the…

VBM on Android - Initial Appium

Pre-ramble Appium is an excellent tool for testing an app running "for reals". No faking talking to other systems - it has to hit the real stuff. I prefer Appium for this as it forces that separation. It requires the application to be treated as a black box.…

VBM on Android - Retrofit Functional Tests

The first thing I'll do for this post is define my use of Functional Tests. This is something I feel needs to be done because the related type of testing, Integration Tests can easily be swapped for each other. In fact I work with people who use them…