OneBusAway / onebusaway-alexa

An Java-based app to communicate with Amazon Alexa for devices such as the Amazon Echo
Other
52 stars 18 forks source link

Fix unit tests #55

Closed philipmw closed 8 years ago

philipmw commented 8 years ago

For some MYSTERIOUS REASON, unit tests on master are failing on my workstation, but they pass in Travis CI. I fixed some mocking that I think make the tests more correct...

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-2.02%) to 50.505% when pulling 11f7c9c9902ae837f414a1901bc3d5ba3272c833 on fix-unit-tests into 0a38f859f5d0e7cae848cf963ed2cd290c900e65 on master.

barbeau commented 8 years ago

Probably due to some state being retained on your machine, as Travis is always clean. I'll take a look at this tomorrow so I can verify it passes on my machine too.

barbeau commented 8 years ago

Passes on my local machine too.

So why did code coverage go down with these changes?

philipmw commented 8 years ago

So did both ways pass on your machine? Looking at the code, can you see why this is more correct?

barbeau commented 8 years ago

Yes, both ways pass on my machine. I think so - so this isolates the obaDao to a single unit test, vs. The state being exposed to all tests? I still need to read the JMockit docs in detail.