Description of changes:
This PR adds an option --seed which allows users to specify the seed value when generating random ion data. If the provided seed value and the schema file are the same as the last execution, the same randomized ion data will be generated.
GeneratorOptions.java
Add a static field randomSeed to the class GeneratorOptions. This field will be overwrote in the step of processing the --seed option. If the seed value provided, the random instance will be crated with the specified seed value and be used in the following data generation process. Otherwise, the random instance will be created with a random seed value.
Main.java
Add an option --seed which allow users to specify the seed value. When they re-run the command with the same seed value and the same input ion schema, the same randomized ion data will be generated.
Test
Add unit test to test whether the generated randomized data is as same as the last execution when specifying the seed value.
Add unit test to test if the regenerated data is randomized when there is no seed value provided.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Issue #, if available: N/A
Description of changes: This PR adds an option
--seed
which allows users to specify the seed value when generating random ion data. If the provided seed value and the schema file are the same as the last execution, the same randomized ion data will be generated.GeneratorOptions.java Add a static field
randomSeed
to the classGeneratorOptions
. This field will be overwrote in the step of processing the--seed
option. If the seed value provided, the random instance will be crated with the specified seed value and be used in the following data generation process. Otherwise, the random instance will be created with a random seed value.Main.java Add an option
--seed
which allow users to specify the seed value. When they re-run the command with the same seed value and the same input ion schema, the same randomized ion data will be generated.Test
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.