Today I found one funny thing: Mockito's mocks are static - while my test (as a choice of the appropriate Play Test framework) is parallel.
So one test mocks something, another does - the same - and then verify
says that I called a method thrice, and I was supposed to do it once.
So I kicked out all
verify
in one test suite, and only three test cases fail now.And I spent most of the day trying to figure out wtf.
What I found. My client code sends an http request. I spent time mostly tracing it to make sure that the data I provide in the body is actually the data sent over the channel on that port I give (19001).
Ok, it turned out yes.
But it also turned out that "by default" I used the "request parser" that ignores the body contents. So that's on the server side. That's the edge I actually had to mock... probably.
Anyway, as soon as I made the parser behave as what is normal in production code, the clock struck 7pm, and it was time for me to go swim and then have dinner. So here I am now.
Another problem was mocking `profile service`. I had a manual mock, but then Safa added some code... well, whatever. No I have two "mocked profile services".
Does not matter, I'm on the right way.
Will write another blog, then do French, and then try to finish two remaining test cases. Now that I know.
Renato scheduled the next sprint, and, since my stuff is obviously not finishing these two weeks, and since I'll be on pager duty... short, I'm free to be done when it's done.
Also, both guys that we interviewed recently are going to be hired. Good. Probably they skipped James - he's really too good for our company. As was Prasad, who applied half a year ago.