Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ceddlyburge/e3c54ee18b6bbe88eef0f640f2e2b99d to your computer and use it in GitHub Desktop.
Save ceddlyburge/e3c54ee18b6bbe88eef0f640f2e2b99d to your computer and use it in GitHub Desktop.
Partial setup class for CustomerTestsExcel framework
public partial class SpecificationSpecificClassWithCustomProperty
{
internal SpecificationSpecificClassWithCustomProperty CustomInt_of(int customInt)
{
// The framework requires you to do this
AddValueProperty(GetCurrentMethod(), customInt);
// And then you can do some custom thing with `value` here
// classWithCustomProperty.Setup(m => m.Name).Returns(customInt.ToString());
// The framework requires you to do this (the syntax is fluent)
return this;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment