Beispiel #1
0
        public async Task Run_GetArtistByUri_DoesNotError()
        {
            var req            = new DefaultHttpContext().Request;
            var requestFeature = req.HttpContext.Features.Get <IHttpRequestFeature>();

            requestFeature.Method      = "get";
            requestFeature.QueryString = "artist=spotify:artist:4VnomLtKTm9Ahe1tZfmZju";
            string type = "uri";

            // act
            try
            {
                var request = await GetArtist.Run(req, type, null);

                var okObjectResult = request as OkObjectResult;
                Assert.IsNotNull(okObjectResult);
                // assert
            }
            catch
            {
                throw;
            }
            finally
            {
                // teardown
            }
        }
Beispiel #2
0
        public async Task Run_SearchArtists_DoesNotError()
        {
            var req            = new DefaultHttpContext().Request;
            var requestFeature = req.HttpContext.Features.Get <IHttpRequestFeature>();

            requestFeature.Method      = "get";
            requestFeature.QueryString = "artist=Jackie%20Wilson";
            string type = "search";

            // act
            try
            {
                var request = await GetArtist.Run(req, type, null);

                var okObjectResult = request as OkObjectResult;
                Assert.IsNotNull(okObjectResult);
                // assert
            }
            catch
            {
                throw;
            }
        }