Ejemplo n.º 1
0
        public async Task PreviousPageForCustomPaging()
        {
            var api     = new Mock <IAPIConnector>();
            var config  = SpotifyClientConfig.CreateDefault("FakeToken").WithAPIConnector(api.Object);
            var spotify = new SpotifyClient(config);

            var response = new Paging <PlayHistoryItem, SearchResponse>
            {
                Previous = "https://previous-url"
            };

            await spotify.PreviousPage(response);

            api.Verify(a => a.Get <SearchResponse>(new System.Uri("https://previous-url")), Times.Once);
        }