RichardWarburton / lambda-behave

A modern testing and behavioural specification framework for Java 8
http://richardwarburton.github.io/lambda-behave/
MIT License
253 stars 52 forks source link

Non random generation #74

Closed hcoles closed 10 years ago

hcoles commented 10 years ago

I'd like to be able to use random values quickcheck style during initial development, then fix the seed so that the tests run with deterministic values from that point on.

I'm not clear if the api supports this, but I couldn't see it documented.

RichardWarburton commented 10 years ago

Hi @hcoles,

Thanks for reporting this issue. We've actually supported setting the seed from day one, but you're certainly right to raise the issue about it not being documented. I've added a property based testing guide which covers this issue:

https://github.com/RichardWarburton/lambda-behave/wiki/Property-Based-Testing

If there's anything else that you feel is missing or undocumented then please submit issues or pull requests to notify/improve the project.

hcoles commented 10 years ago

Thanks - you might want to consider renaming randomNumbers(long) to deterministicNumbers(long).

RichardWarburton commented 10 years ago

Good suggestion - I've done that. Also decided the javadoc needed some clarification.