GithubHelp home page GithubHelp logo

eupadhyaya / javaobjectmockfakedata Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 8 KB

create the fake data to any class

License: MIT License

Java 100.00%
fake-data-generator mock-data fake-object-data mock-java-data junit-fake-data

javaobjectmockfakedata's Introduction

Java Object Mock Fake Data

This code helps to create the fake data to any class with the below types.

  • Integer.class
  • int.class
  • Long.class
  • long.class
  • String.class
  • Double.class
  • double.class
  • BigDecimal.class
  • Boolean.class
  • boolean.class
  • List.class
  • Set.class
  • Queue.class
  • MultipartFile.class
  • any declared class

Two features has been added.

  1. Pass the class, create fake data.

MockBeanData mockBean = new MockBeanData(); SampleBean sampleBean = (SampleBean) mockBean.createMockData(SampleBean.class);

sampleBean has the autogenerated fake data.

  1. Pass the class and custom field values, create fake data with the custom field values provided on top.

MockBeanData mockBean = new MockBeanData(); Map<String, Object> customValues = new HashMap<String, Object>(); customValues.put("name", "custom data"); SampleBean sampleBean = (SampleBean) mockBean.createMockData(SampleBean.class, customValues);

sampleBean has the autogenerated fake data with where ever the name property will have the "custom data" as value.

javaobjectmockfakedata's People

Contributors

eupadhyaya avatar

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.