Skip to content

Instantly share code, notes, and snippets.

@dacr
Last active April 2, 2023 10:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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/43da74d0ccbee492408d1c9d77d98cb4a8428b70
// 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.1.1"
//> 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