public class ContractStateGenerator
This file contains generators for quickcheck style testing. The idea is that we can write random instance generators for each type we have in the code and test against those instead of predefined mock data. This style of testing can catch corner case bugs and test algebraic properties of the code, for example deserialize(serialize(generatedThing)) == generatedThing
TODO add combinators for easier Generator writing
Constructor and Description |
---|
ContractStateGenerator()
This file contains generators for quickcheck style testing. The idea is that we can write random instance generators
for each type we have in the code and test against those instead of predefined mock data. This style of testing can
catch corner case bugs and test algebraic properties of the code, for example deserialize(serialize(generatedThing)) == generatedThing
|
Modifier and Type | Method and Description |
---|---|
ContractState |
generate(com.pholser.junit.quickcheck.random.SourceOfRandomness random,
com.pholser.junit.quickcheck.generator.GenerationStatus status) |
public ContractStateGenerator()
This file contains generators for quickcheck style testing. The idea is that we can write random instance generators for each type we have in the code and test against those instead of predefined mock data. This style of testing can catch corner case bugs and test algebraic properties of the code, for example deserialize(serialize(generatedThing)) == generatedThing
TODO add combinators for easier Generator writing
public ContractState generate(com.pholser.junit.quickcheck.random.SourceOfRandomness random, com.pholser.junit.quickcheck.generator.GenerationStatus status)