private Task GivenArtistWasFound() { _mediator.Setup(x => x.Send(It.IsAny <SearchArtistByNameRequestDto>(), It.IsAny <CancellationToken>())) .ReturnsAsync(Result <SearchArtistByNameResponseDto> .Success(new SearchArtistByNameResponseDto { Artists = new List <ArtistDto>(new [] { _testsInitializer.Fixture.Create <ArtistDto>() }) })); _httpRequest = _testsInitializer.GetMockedRequest(new Dictionary <string, StringValues> { { "correlationId", "somecorrelationid" } }, new Dictionary <string, StringValues> { { "name", "cheranga" } }); return(Task.CompletedTask); }
private Task GivenInvalidCorrelationIdIsProvidedInRequest(string correlationId) { _httpRequest = _testsInitializer.GetMockedRequest(new Dictionary <string, StringValues> { { "correlationId", correlationId } }); _mediator.Setup(x => x.Send(It.IsAny <SearchRecordsForArtistByIdRequestDto>(), It.IsAny <CancellationToken>())) .ReturnsAsync(Result <SearchRecordsForArtistByIdResponseDto> .Failure(ErrorCodes.ValidationError, "errormessage")); return(Task.CompletedTask); }
private void GivenHttpQueryStringIsNull() { _request = _testsInitializer.GetMockedRequest(); }