示例#1
0
        public void Reset(ICacheSettingsContainer container = null)
        {
            var repository = new RepositoryMock();

            repository.RemoveAll();

            ApiCacheService = new RealmApiCacheService(repository);

            ConnectivityService = new ConnectivityMock();

            MockHttpMessageHandler = new HttpMessageHandlerMock();

            MessageHandler = new CacheMessageHandler(MockHttpMessageHandler, ApiCacheService, ConnectivityService)
            {
                CacheSettingsContainer = container
            };

            HttpClient = new HttpClient(MessageHandler);
        }
示例#2
0
 public void SetCacheSettingsContainer(ICacheSettingsContainer container) => Reset(container);