Skip to content

Instantly share code, notes, and snippets.

@dacr
Last active March 29, 2025 08:39
Show Gist options
  • Save dacr/8d3c5db21314f5a3d44ad9c5bff53c5c to your computer and use it in GitHub Desktop.
Save dacr/8d3c5db21314f5a3d44ad9c5bff53c5c to your computer and use it in GitHub Desktop.
Using java faker to generate good looking information / published by https://github.com/dacr/code-examples-manager #01265c26-1356-4635-a18f-68f857b36504/12419fdaabf8e03523b58732f3201fc9760b0ebf
// summary : Using java faker to generate good looking information
// keywords : scala, fakedata, data, @testable
// publish : gist
// authors : David Crosson
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
// id : 01265c26-1356-4635-a18f-68f857b36504
// created-on : 2021-03-15T10:08:27Z
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : scala-cli $file
// ---------------------
//> using scala "3.6.4"
//> using dep "com.github.javafaker:javafaker:1.0.2"
// ---------------------
val faker = new com.github.javafaker.Faker()
val appName = faker.app.name
val author = faker.name.name
val email = faker.internet.emailAddress
val company = faker.company.name
val companyURL = faker.company.url
val country = faker.country.name
println(s"""'$appName' an application By $author / $email""")
println(s"""'$company' / $country/ $companyURL""")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment