So as you will be able to see in the code, my class constructor asks the user for an input of the “initialValue” of their object. I then have a method “addToValue” which adds to that value. When trying to use JUnit4 to learn TDD it does not use the “initialValue” parameter …
Tag: tdd
Are 2 references to an object == to each other?
I have a method, move(xSteps, ySteps), which takes a point and moves it according to the parameters on the method by increasing or decreasing x and y. But when the xSteps and ySteps are both 0, I want to store the moved point (which didn’t actually move) in the same memory location as the original point…
What is the purpose of @SmallTest, @MediumTest, and @LargeTest annotations in Android?
I’m new to Android and I’ve seen example code using these annotations. For example: What does that annotation accomplish? Answer As an addition to Davidann’s answer and mainly OP’s question in the comment: In the context of the code above, does it actually DO anything except leave a no…
Checking the results of a Factory in a unit test
I have developed some classes with similar behavior, they all implement the same interface. I implemented a factory that creates the appropriate object and returns the interface. I am writing a unit test for the factory. All you get back is an interface to the object. What is the best way to test that the fac…