• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Devskiller/jfairy: Java fake data generator

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

Devskiller/jfairy

开源软件地址:

https://github.com/Devskiller/jfairy

开源编程语言:

Java 67.1%

开源软件介绍:

jFairy by Devskiller

Build Status Maven Central Javadocs Coverage Status Stack Overflow Join the chat at https://gitter.im/Codearte/jfairy

Java fake data generator. Based on Wikipedia:

Fairyland, in folklore, is the fabulous land or abode of fairies or fays.

Try jFairy online!

https://devskiller.com/datafairy/

Usage

Creating simple objects:

Fairy fairy = Fairy.create();
Person person = fairy.person();

System.out.println(person.getFirstName());            
// Chloe Barker
System.out.println(person.getEmail());               
// [email protected]
System.out.println(person.getTelephoneNumber());     
// 690-950-802

Person adultMale = fairy.person(PersonProperties.male(), PersonProperties.minAge(21));
System.out.println(adultMale.isMale());           
// true
System.out.println(adultMale.getDateOfBirth());      
// at least 21 years earlier

Creating related objects:

Fairy fairy = Fairy.create();
Company company = fairy.company();
System.out.println(company.getName());          
// Robuten Associates
System.out.println(company.getUrl());           
// http://www.robuteniaassociates.com

Person salesman = fairy.person(PersonProperties.withCompany(company));
System.out.println(salesman.getFullName());     
// Juan Camacho
System.out.println(salesman.getCompanyEmail()); 
// [email protected]

Locale support:

Fairy enFairy = Fairy.create();                               
// Locale.ENGLISH is default
Fairy plFairy = Fairy.create(Locale.forLanguageTag("pl"));    
// Polish version

Other samples

Look into code samples

Building

This project can be built using maven command:

./mvnw install



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap