public static T CreateFake <T>(T instance) { if (!initialized) { recorder = new DefaultRecorder(new DefaultStorage()); initialized = true; } var fake = A.Fake <T>(x => x.Wrapping(instance).RecordedBy(recorder)); Fake.GetFakeManager(fake).AddInterceptionListener(recorder); return(fake); }
public static void SetStore(ICallStorage storage) { recorder = new DefaultRecorder(storage); initialized = true; }