nomemory/mockneat

Composite Object MockNeat

asethia opened this issue · 1 comments

I am trying to create mock data from MockNeat for Composite Object for example (It is scala code but same applies for the Java Beans as well):

case class User(name:String)

case class Group(id:Int, name:String)

case class UserGroups(user:User, group:Group)

I would like to create data for UserGroups. I tried the following approach:

  1. generate User mock data using User class --> userData
  2. generate Group data using using Group Class --> groupData
  3. Generate UserGroup using mockNeat.from(userData) , mockNeat.from(groupData)

The point#3 is not working, It keep throwing error HashSet empty.

Can you please share the Scala code ? I am fluent in the language and I can debug better over the code.