class Address: YamlFakeDataProvider<Address>

FakeDataProvider implementation for YamlCategory.ADDRESS category.

Fields

Name Description
protected yamlCategory: YamlCategory

Category for this fake yaml data provider class.

This is the key entry after the faker key in .yml locale file.

For example address.yml file has the following structure:


en:
  faker:
    address:

then the yamlCategory would be YamlCategory.ADDRESS

NB! If the secondaryCategory is NOT set,the dictionary filename should match the yamlCategory name,i.e. the file name should be address.yml for the YamlCategory.ADDRESS.

protected localUniqueDataProvider: LocalUniqueDataProvider<Address>

A LocalUniqueDataProvider instance that is used with this unique provider.

val unique: Address

An instance of T for generating unique values

Methods

cityPrefix

fun cityPrefix(): resolve("city_prefix")

ReturnValue

Name Description
resolve("city_prefix")

citySuffix

fun citySuffix(): resolve("city_suffix")

ReturnValue

Name Description
resolve("city_suffix")

country

fun country(): resolve("country")

ReturnValue

Name Description
resolve("country")

countryByCode

fun countryByCode(countryCode: String): String

Parameters

Name Description
countryCode: String

ReturnValue

Name Description
String

countryByName

fun countryByName(countryName: String): String

Parameters

Name Description
countryName: String

ReturnValue

Name Description
String

countryCode

fun countryCode(): resolve("default_country_code" or "country_code")

ReturnValue

Name Description
resolve("default_country_code" or "country_code")

countryCodeLong

fun countryCodeLong(): resolve("country_code_long")

ReturnValue

Name Description
resolve("country_code_long")

buildingNumber

fun buildingNumber(): with(fakerService) { resolve("building_number").numerify() }

ReturnValue

Name Description
with(fakerService) { resolve("building_number").numerify() }

communityPrefix

fun communityPrefix(): resolve("community_prefix")

ReturnValue

Name Description
resolve("community_prefix")

communitySuffix

fun communitySuffix(): resolve("community_suffix")

ReturnValue

Name Description
resolve("community_suffix")

community

fun community(): resolve("community")

ReturnValue

Name Description
resolve("community")

streetSuffix

fun streetSuffix(): resolve("street_suffix")

ReturnValue

Name Description
resolve("street_suffix")

secondaryAddress

fun secondaryAddress(): with(fakerService) { resolve("secondary_address").numerify() }

ReturnValue

Name Description
with(fakerService) { resolve("secondary_address").numerify() }

postcode

fun postcode(): with(fakerService) { val pattern = resolve("postcode") when { pattern.contains('#') -> pattern.numerify() else -> pattern.regexify().replace("/", "") } }

ReturnValue

Name Description
with(fakerService) { val pattern = resolve("postcode") when { pattern.contains('#') -> pattern.numerify() else -> pattern.regexify().replace("/", "") } }

postcodeByState

fun postcodeByState(state: String): with(fakerService) { resolve("postcode_by_state", state).numerify() }

Parameters

Name Description
state: String

ReturnValue

Name Description
with(fakerService) { resolve("postcode_by_state", state).numerify() }

state

fun state(): resolve("state")

ReturnValue

Name Description
resolve("state")

stateAbbr

fun stateAbbr(): resolve("state_abbr")

ReturnValue

Name Description
resolve("state_abbr")

timeZone

fun timeZone(): resolve("time_zone")

ReturnValue

Name Description
resolve("time_zone")

city

fun city(): resolve("city")

ReturnValue

Name Description
resolve("city")

cityWithState

fun cityWithState(): resolve("city_with_state")

ReturnValue

Name Description
resolve("city_with_state")

streetName

fun streetName(): resolve("street_name")

ReturnValue

Name Description
resolve("street_name")

streetAddress

fun streetAddress(): with(fakerService) { resolve("street_address").numerify() }

ReturnValue

Name Description
with(fakerService) { resolve("street_address").numerify() }

fullAddress

fun fullAddress(): with(fakerService) { resolve("full_address").numerify() }

ReturnValue

Name Description
with(fakerService) { resolve("full_address").numerify() }

mailbox

fun mailbox(): with(fakerService) { resolve("mail_box").numerify() }

ReturnValue

Name Description
with(fakerService) { resolve("mail_box").numerify() }

defaultCountry

fun defaultCountry(): resolve("default_country")

ReturnValue

Name Description
resolve("default_country")