I have a Java class. How can I unit test it?
In my case, I have class does a binary sum. It takes two byte[]
arrays, sums them, and returns a new
Like @CoolBeans mentioned, take a look at jUnit. Here is a short tutorial to get you started as well with jUnit 4.x
Finally, if you really want to learn more about testing and test-driven development (TDD) I recommend you take a look at the following book by Kent Beck: Test-Driven Development By Example.