Show / Hide Table of Contents

Class NaturalTextGenerator

Generates human-readable English text for tests

Inheritance
System.Object
NaturalTextGenerator
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: NFX.Parsing
Assembly: NFX.dll
Syntax
public static class NaturalTextGenerator

Fields

CITY_SUFFIXES

Declaration
public static readonly string[] CITY_SUFFIXES
Field Value
Type Description
System.String[]

DOMAIN_NAMES

Declaration
public static readonly string[] DOMAIN_NAMES
Field Value
Type Description
System.String[]

LAST_NAME_SUFFIXES

Declaration
public static readonly string[] LAST_NAME_SUFFIXES
Field Value
Type Description
System.String[]

POPULAR_CITY_NAMES

Declaration
public static readonly string[] POPULAR_CITY_NAMES
Field Value
Type Description
System.String[]

POPULAR_FIRST_NAMES

Declaration
public static readonly string[] POPULAR_FIRST_NAMES
Field Value
Type Description
System.String[]

POPULAR_LAST_NAMES

Declaration
public static readonly string[] POPULAR_LAST_NAMES
Field Value
Type Description
System.String[]

STREET_SUFFIXES

Declaration
public static readonly string[] STREET_SUFFIXES
Field Value
Type Description
System.String[]

TLD_NAMES

Declaration
public static readonly string[] TLD_NAMES
Field Value
Type Description
System.String[]

US_STATES

Declaration
public static readonly string[] US_STATES
Field Value
Type Description
System.String[]

Methods

Generate(Int32)

Generates human-readable English text of up to specified length which is of 10 chars at minimum. If zero passed then generates msg of random length

Declaration
public static string Generate(int length = 150)
Parameters
Type Name Description
System.Int32 length
Returns
Type Description
System.String

GenerateAddressLine()

Generates a string that resembles an address line

Declaration
public static string GenerateAddressLine()
Returns
Type Description
System.String

GenerateCityName()

Generates a string that resembles a city name

Declaration
public static string GenerateCityName()
Returns
Type Description
System.String

GenerateEMail()

Generates a string that looks like an email

Declaration
public static string GenerateEMail()
Returns
Type Description
System.String

GenerateFirstName()

Generates a string that resembles a human first name

Declaration
public static string GenerateFirstName()
Returns
Type Description
System.String

GenerateFullName(Boolean)

Generates a string that looks like a human name

Declaration
public static string GenerateFullName(bool middle = false)
Parameters
Type Name Description
System.Boolean middle
Returns
Type Description
System.String

GenerateLastName()

Generates a string that resembles a human last name

Declaration
public static string GenerateLastName()
Returns
Type Description
System.String

GenerateUSCityStateZip()

Generates a string that resembles a city/state/zip in a US address. The states/zips are NOT consistent

Declaration
public static string GenerateUSCityStateZip()
Returns
Type Description
System.String

GenerateWord(Int32, Int32)

Generates a random English word which is of the specified size. The min size must be of at least 4 chars

Declaration
public static string GenerateWord(int minLength = 4, int maxLength = 20)
Parameters
Type Name Description
System.Int32 minLength
System.Int32 maxLength
Returns
Type Description
System.String
Back to top Copyright © 2006-2018 Agnicore Inc
Generated by DocFX