Posts in testing

Unit Testing Random Behavior With Mock Objects

What happens when you’re trying to write some unit tests and suddenly you need to test a method with non-deterministic properties. In other words how do you test a method whose expected behavior is random behavior? The answer is with mock objects. I’ve seen a bunch of suggestions to use a mock randomizer but I haven’t seen anyone actually explain it further than that. Hopefully this will help someone out

written in guide, java, testing Read on →