public void Setup() { executedRestVoidMethodCount = 0; executedRestNonVoidMethodCount = 0; _mockedDecoratedRestService = new Mock <IRestService>(); _systemUnderTest = new RefitRestServiceRetryProxy(_mockedDecoratedRestService.Object, typeof(IRestMockedApi).Assembly); }
protected override void Load(ContainerBuilder builder) { base.Load(builder); builder.RegisterType <ViewAndViewModelResolver>().As <IViewAndViewModelResolver>().SingleInstance(); builder.RegisterType <FormsNavigationService>().As <INavigationService>() .AsSelf().SingleInstance(); builder.Register(context => { var dict = new Dictionary <Type, DelegatingHandler>(); dict.Add(typeof(DiagnosticsClientHandler), new DiagnosticsClientHandler()); var restService = new RefitRestServiceRetryProxy(new RefitRestService(dict), ThisAssembly); BaseApiConfiguration.ApiUri = new Uri(Constants.BaseUrl); return(restService); }).As <IRestService>() .SingleInstance(); builder.RegisterType <PhotosService>().As <IPhotosService>(); }