I can not test it at the moment but you may have to do the object creation inside a wrapper method.
public static void TestWrapper(String foo, Int32 bar, Boolean buzz, Decimal foobar)
{
var thing = new Thing(foo, bar);
thing.Buzz = buzz;
Test(thing, blah);
}
public static Test(Thing thing, Decimal foobar)
{
thing.DoStuff();
if (thing.State == 42)
{
thing.DoOtherStuff(foobar);
}
}
In my experience Pex yields really great results when you use it to analyze methods that are close to mathematically functions with not to many side effects and especially state mutation. Tracking changing state over time and finding sequences of operations to prepare an object to a certain state and then checking the behavior of the object in this state is much harder than analyzing a (almost) pure function.