C# Класс Habanero.Testability.ValidValueGeneratorTextFile

Generates random values from a text file. If a filename is not specified, the generator will look for a filename that has the name of the property (e.g. FirstName) with a ".txt" extension. Each item should appear on a different line in the text file. Once the values have been read from the file once, the items are cached in memory for rapid test performance.
Наследование: ValidValueGenerator
Показать файл Открыть проект

Открытые методы

Метод Описание
GenerateValidValue ( ) : object

Generates a valid value taking into account only the IPropRules. I.e. any InterPropRules will not be taken into account. The IValidValueGeneratorNumeric's methods are used by the BOTestFactory to create valid values taking into account InterPropRules

ValidValueGeneratorTextFile ( ISingleValueDef propDef, string fileName = null ) : System.Collections.Generic

Constructs a new instance of the generator

Приватные методы

Метод Описание
CreateSampleValues ( ) : void
GetStringsFromFile ( ) : List

Описание методов

GenerateValidValue() публичный Метод

Generates a valid value taking into account only the IPropRules. I.e. any InterPropRules will not be taken into account. The IValidValueGeneratorNumeric's methods are used by the BOTestFactory to create valid values taking into account InterPropRules
public GenerateValidValue ( ) : object
Результат object

ValidValueGeneratorTextFile() публичный Метод

Constructs a new instance of the generator
public ValidValueGeneratorTextFile ( ISingleValueDef propDef, string fileName = null ) : System.Collections.Generic
propDef ISingleValueDef The definition of the property for which random values will be generated
fileName string The filename that contains the available values, including the path. If the path is relative, /// it will relate to the execution directory. If no filename is specified, the filename used will be the /// property name (e.g. FirstName) with a ".txt" extension.
Результат System.Collections.Generic