C# 클래스 Habanero.Testability.ValidValueGeneratorRegEx

Generates valid values that match a given regular expression. The generation is done using Rex.exe, a Microsoft Research Project executable that must be placed in the working directory of the application. The executable is run as a command-line application that runs slowly the first time and then faster once the operating system stores/caches the exe. You can find the homepage of Rex here: http://research.microsoft.com/en-us/projects/rex/ You can find additional commentary/limitations on Rex here: http://www.kodefuguru.com/post/2010/05/03/Generate-Matches-for-Regular-Expressions-Using-Rex.aspx
A potential future improvement of this test is to allow you to build up a cache of values. For instance, you could store the first 100 values generated and then access that cache rather than regenerate. This could give you a significant performance boost. The main trouble is how to set that cache size - where do you pass the size through to the generator?
상속: ValidValueGenerator
파일 보기 프로젝트 열기: Chillisoft/habanero.testability

공개 메소드들

메소드 설명
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

ValidValueGeneratorRegEx ( ISingleValueDef singleValueDef, string regExPhrase ) : System

Creates a new instance of the generator

비공개 메소드들

메소드 설명
GenerateValueUsingRex ( ) : object

메소드 상세

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

ValidValueGeneratorRegEx() 공개 메소드

Creates a new instance of the generator
public ValidValueGeneratorRegEx ( ISingleValueDef singleValueDef, string regExPhrase ) : System
singleValueDef ISingleValueDef The property definition that indicates which property the values are being generated for
regExPhrase string The regular expression against which generated values must match
리턴 System