Open vajda opened 7 years ago
Sometimes, it is handy to define and reuse same value within different fields. Using references would end up in having same value generated:
genre: random(['action', 'horror', 'thriller', 'drama', 'comedy', 'sci-fi', 'fantasy']) movie1: title: random(...) genre: $genre movie2: title: random(...) genre: $genre
This will work, however, both movies will always end up with same genre, but it should be possible for them to have different genres. In order to make this possible, genre should be reused in a way that will create different instances.
Proposed syntax for clone value is:
genre: random(['action', 'horror', 'thriller', 'drama', 'comedy', 'sci-fi', 'fantasy']) movie1: title: random(...) genre: $$genre movie2: title: random(...) genre: $$genre
This feature should be available within Java API as well. possibly with clone method on generator.
clone
Sometimes, it is handy to define and reuse same value within different fields. Using references would end up in having same value generated:
This will work, however, both movies will always end up with same genre, but it should be possible for them to have different genres. In order to make this possible, genre should be reused in a way that will create different instances.
Proposed syntax for clone value is:
This feature should be available within Java API as well. possibly with
clone
method on generator.