Skip to content

Commit d4d6a62

Browse files
committed
Add new random variables
Signed-off-by: Gopal S Akshintala <[email protected]>
1 parent c6e9e89 commit d4d6a62

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/main/kotlin/com/salesforce/revoman/internal/postman/DynamicVariableGenerator.kt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,19 @@
88
package com.salesforce.revoman.internal.postman
99

1010
import io.github.serpro69.kfaker.faker
11-
import kotlinx.datetime.Clock
12-
import org.apache.commons.lang3.RandomStringUtils
1311
import java.time.LocalDate
1412
import java.util.*
1513
import kotlin.random.Random.Default.nextBoolean
1614
import kotlin.random.Random.Default.nextInt
1715
import kotlin.random.Random.Default.nextLong
16+
import kotlinx.datetime.Clock
17+
import org.apache.commons.lang3.RandomStringUtils
1818

1919
private val faker = faker {}
2020

2121
/**
22-
* https://learning.postman.com/docs/writing-scripts/script-references/variables-list/
22+
* [Postman
23+
* Variables](https://learning.postman.com/docs/writing-scripts/script-references/variables-list/)
2324
*/
2425
private val dynamicVariableGenerators: Map<String, () -> String> =
2526
mapOf(
@@ -40,11 +41,13 @@ private val dynamicVariableGenerators: Map<String, () -> String> =
4041
// Phone, address, and location
4142
"\$randomCity" to faker.address::city,
4243
// Grammar
43-
"\$randomWord" to faker.lorem::words,
44+
"\$randomAdjective" to faker.adjective::positive,
45+
// Business
4446
"\$randomCompanyName" to faker.company::name,
4547
"\$randomWord" to faker.lorem::words,
46-
"\$randomAdjective" to faker.adjective::positive,
48+
// Domains, emails, and usernames
4749
"\$randomEmail" to { faker.internet.email() },
50+
// Date time
4851
"\$currentDate" to { LocalDate.now().toString() },
4952
"\$randomFutureDate" to
5053
{

0 commit comments

Comments
 (0)