Use Object Hydrator to fake a search result

You can pass values into either the Attribute or the Attribute map, and override the result from the generator.  This allows you to fake a search result.

So going back to the attribute method and building on the previous example...if I add a value of "Smith" to the attribute "LastName" like so:

            [LastName("Smith")]

            public string LastName { get; set; }

And Re-run it all of my results will have the last name of "Smith"

Similarly with the Attribute Map method I can set the GeneratorDefaultValue property to "Smith" and get the same results.

TTFN!

 

Published Wednesday, September 16, 2009 12:36 PM by ryansjedi
Filed under: ,

Comments

No Comments

Leave a Comment

(required) 
(required) 
(optional)
(required)