Skip to content

Instantly share code, notes, and snippets.

@thomaslevesque
Created June 9, 2016 17:05
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save thomaslevesque/2eb64c5fb6e7a012443f8b488b0c67a7 to your computer and use it in GitHub Desktop.
Adapter to ease the migration from FakeItEasy 1.x to 2.0.0, to avoid modifying existing fake configurators.
using FakeItEasy;
using FakeItEasy.Creation;
namespace TestUtilies
{
public abstract class FakeConfigurator<T> : FakeOptionsBuilder<T>
{
protected override void BuildOptions(IFakeOptions<T> options)
{
options.ConfigureFake(ConfigureFake);
}
public abstract void ConfigureFake(T fakeObject);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment