Day 19 at Makers Academy

Last Day of Oyster Cards and Mocking Practicals

This morning we had the workshop on testing with doubles. Again it is something we had worked on a little so it wasn’t completely new, but it was good to practice. We completed one of the skills workshop challenges, where we had to refactor tests to use doubles and stubs rather than relying on other classes. This was fairly straightforward to do.

After that I completed a practical, Testing Relationships Between Classes. This was basically the same thing, using doubles for testing. The task itself was quite unclear, there were no other classes actually being used, so it was not actually clear why you would need doubles. It doesn’t help that the first 2 tests you don’t need them at all as they are testing for failure! Eventually I noticed that there was a variable which called methods on itself, therefore it was being used in place of a new class being created. I used doubles and stubs to replicate this and test in isolation. It didn’t take long once I saw that, it was fairly easy to complete. Here is the completed repo.

No mention of a Diary class anywhere!

We carried on with Oyster Cards in the afternoon. The two people I was partnered with were only one step behind me, although it was quite a long and difficult step! I explained how I did it and helped them implement it into their code, as well as changing the tests. There was quite a few differences between our sets of code, with a couple of things I added from theirs to improve mine further. We had also implemented the feature set out in step 16, the last step, which calculated the fare. It was easier to do this now so that certain tests would work better.

In the end we all decided that we didn’t have enough time to properly do step 15, but what we had done was good enough. It passed all the tests, I ran the coverage tool on it and got 100%, and it had covered every feature mentioned in the user stories.

Looking ahead to tomorrow, our Friday challenge is to build a takeaway service. It will be similar to oyster cards however it does mention having to send and receive texts using the program, something which I have briefly tested but am not really sure how to do, so it will be quite interesting!


Todays song is a whole album, however it is cut into one long song, so that still counts!

Slightly more unknown than some of the others, great album though, would definitely recommend the whole thing

Leave a comment