public GoogleBooksApiClientTests()
        {
            var fixture = new Fixture();

            var clientService = fixture.Create <BooksService>();

            _testGetRequest  = new VolumesResource.GetRequest(clientService, "test");
            _testListRequest = new VolumesResource.ListRequest(clientService, "test");
            _volumesResource = new Mock <VolumesResource>(clientService);

            _volumesResource.Setup(x => x.Get(It.IsAny <string>())).Returns(_testGetRequest);
            _volumesResource.Setup(x => x.List("test")).Returns(_testListRequest);

            _apiClient = new GoogleBooksApiClient(_volumesResource.Object);
        }
 public GoogleBooksProvider(IGoogleBooksApiClient apiClient) => _apiClient = apiClient;
Beispiel #3
0
 public GoogleBooksClient(IGoogleBooksApiClient apiClient)
 {
     this.apiClient = apiClient;
 }