Giter Site home page Giter Site logo

Comments (2)

nomemory avatar nomemory commented on June 15, 2024

Hi,

I think it's possible. Every generator is a MockUnit (that's the interface). And also a specific class that implements this interface or a more specific one (MockUnitString, MockUnitInt, etc.).

For example Names: https://github.com/nomemory/mockneat/blob/master/src/main/java/net/andreinc/mockneat/unit/user/Names.java

I don't see any reason it won't work what you want to achieve. You can keep an instance of Names in xgen.First_Name and then call get() through reflection to get a different name all the time.

Depending on how much you can modify your internal tool, you can also mingle scripts in the JSON you are using for your schemas. I did something similar in:
https://github.com/nomemory/serverneat#json-response-dynamic---using-mockneat

Keep me posted.

PS: another idea is to serialise all the Pojos you generated (see serialize() method from MockUnit) and the read them from the disk.

from mockneat.

nomemory avatar nomemory commented on June 15, 2024

@cvgaviao Any luck? Need any help?

from mockneat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.