The Find Member Pattern operator is one of the optional
Cell Operators. It looks for members with a MemberPattern attribute containing a regular expression that matches the contents of a member cell.
With this class:
public class SampleClass {
[MemberPattern("do (.*) with (.*)")]
public void DoStuff(string what, string withWhom) {
Field = "I did " + what + " with " + withWhom;
}
public string Field;
}
when input is⇓
story test fixture |
check | plain test | configure processor 'add operator' findmemberpattern
with new fitSharp.Test.Double.SampleClass
'do math with sally'
check field 'I did math with sally' | configure | processor | add operator | findmemberpattern |
with | new | fitSharp.Test.Double.SampleClass |
check | field | I did math with sally |
|
| configure processor 'add operator' findmemberpattern
with new fitSharp.Test.Double.SampleClass
'do math with sally'
check field 'I did math with sally' | then output is | configure | processor | add operator | findmemberpattern |
with | new | fitSharp.Test.Double.SampleClass |
check | field | I did math with sally |
|