Wednesday, July 8, 2009

Day 31

I finished the task! To be honest, and it was a bit frustrating, the hardest part about this task was actually testing it. It was good though because I learned a lot about Mockito, which by the way is awesome, as well has some other neat little testing tricks. For example, if you have a method that you want to test, but it calls another method that you don't want to test, you can just override that method in your test by saying something like :
Object object = new Object() {
public void methodIDontWantToTest(){...}
}
I prefer using Mockito, but there are certain cases when mockito wouldn't fit and I had to override. Good to know though.
The biggest issue I encountered actually came about because of some naming conventions, where I thought a Table was one thing, but really and super secretly, it was the same thing?!? Except meant for a different purpose and spot, and it tripped me up. I hate super secret, but extremely obvious code.

No comments:

Post a Comment