public void Setup() { _logFake = new LogFake(); UnityInterception.PerformanceMonitor performanceMonitor = new UnityInterception.PerformanceMonitor(_logFake); IQuestion defaultQuestion = Intercept.ThroughProxy <IQuestion>(new Default(), new InterfaceInterceptor(), new IInterceptionBehavior[] { performanceMonitor }); IQuestion fizzQuestion = Intercept.ThroughProxy <IQuestion>(new Fizz(defaultQuestion), new InterfaceInterceptor(), new IInterceptionBehavior[] { performanceMonitor }); IQuestion buzzQuestion = Intercept.ThroughProxy <IQuestion>(new Buzz(fizzQuestion), new InterfaceInterceptor(), new IInterceptionBehavior[] { performanceMonitor }); IQuestion fizzBuzzQuestion = Intercept.ThroughProxy <IQuestion>(new Questions.FizzBuzz(buzzQuestion), new InterfaceInterceptor(), new IInterceptionBehavior[] { performanceMonitor }); _fizzBuzzController = Intercept.ThroughProxy <IFizzBuzzController>( new FizzBuzzUnityController(fizzBuzzQuestion), new InterfaceInterceptor(), new IInterceptionBehavior[] { new UnityInterception.PerformanceMonitor(_logFake) }); }
public void Setup() { _logFake = new LogFake(); _fizzBuzzController = new FizzBuzzCastleController(new CastleProxy <IQuestion>(_logFake)); }