本文整理汇总了Java中io.codearte.jfairy.Fairy.textProducer方法的典型用法代码示例。如果您正苦于以下问题:Java Fairy.textProducer方法的具体用法?Java Fairy.textProducer怎么用?Java Fairy.textProducer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类io.codearte.jfairy.Fairy
的用法示例。
在下文中一共展示了Fairy.textProducer方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generateStory
import io.codearte.jfairy.Fairy; //导入方法依赖的package包/类
public static Story generateStory(){
Fairy fairy = Fairy.create();
TextProducer textProducer = fairy.textProducer();
BaseProducer baseProducer = fairy.baseProducer();
Story story = new Story.Builder()
.title(textProducer.sentence())
.userId(String.valueOf(baseProducer.randomBetween(0, 999999999)))
.geolocation(getRandomGeoLocation())
.groupId(null)
.id(String.valueOf(baseProducer.randomBetween(0, 999999999)))
.story(textProducer.paragraph())
.build();
return story;
}
示例2: generateStoryWithoutId
import io.codearte.jfairy.Fairy; //导入方法依赖的package包/类
public static Story generateStoryWithoutId(){
Fairy fairy = Fairy.create();
TextProducer textProducer = fairy.textProducer();
BaseProducer baseProducer = fairy.baseProducer();
Story story = new Story.Builder()
.title(textProducer.sentence())
.userId(String.valueOf(baseProducer.randomBetween(0, 999999999)))
.geolocation(getRandomGeoLocation())
.groupId(null)
.story(textProducer.paragraph())
.build();
return story;
}
示例3: generateComment
import io.codearte.jfairy.Fairy; //导入方法依赖的package包/类
public static Comment generateComment() {
Fairy fairy = Fairy.create();
TextProducer textProducer = fairy.textProducer();
BaseProducer baseProducer = fairy.baseProducer();
Comment comment = new Comment.Builder()
.storyId(String.valueOf(baseProducer.randomBetween(0, 999999999)))
.description(textProducer.paragraph(10))
.userId(String.valueOf(baseProducer.randomBetween(0, 999999999)))
.header(textProducer.sentence())
.id(String.valueOf(baseProducer.randomBetween(0, 999999999)))
.build();
return comment;
}
示例4: generateStoryRequest
import io.codearte.jfairy.Fairy; //导入方法依赖的package包/类
public static StoryRequest generateStoryRequest() {
Fairy fairy = Fairy.create();
TextProducer textProducer = fairy.textProducer();
return new StoryRequest(textProducer.paragraph(),textProducer.sentence(),null, getRandomGeoLocation());
}
示例5: generateStory
import io.codearte.jfairy.Fairy; //导入方法依赖的package包/类
public static Story generateStory() {
Fairy fairy = Fairy.create();
TextProducer textProducer = fairy.textProducer();
BaseProducer baseProducer = fairy.baseProducer();
Story story = new Story.Builder<>()
.title(textProducer.sentence())
.userId(String.valueOf(baseProducer.randomBetween(0, 999999999)))
.geolocation(generateRandomGeolocation())
.id(String.valueOf(baseProducer.randomBetween(0, 999999999)))
.story(textProducer.paragraph())
.build();
return story;
}
示例6: generateStory
import io.codearte.jfairy.Fairy; //导入方法依赖的package包/类
public static Story generateStory(){
Fairy fairy = Fairy.create();
TextProducer textProducer = fairy.textProducer();
BaseProducer baseProducer = fairy.baseProducer();
Story story = new Story.Builder()
.title(textProducer.sentence())
.userId(String.valueOf(baseProducer.randomBetween(0, 999999999)))
.geolocation(generateRandomGeolocation())
.id(String.valueOf(baseProducer.randomBetween(0, 999999999)))
.story(textProducer.paragraph())
.build();
return story;
}
示例7: generateCommentRequest
import io.codearte.jfairy.Fairy; //导入方法依赖的package包/类
public static CommentRequest generateCommentRequest(){
Fairy fairy = Fairy.create();
TextProducer textProducer = fairy.textProducer();
return new CommentRequest(textProducer.sentence(),textProducer.sentence());
}