public async void GivenValidSortOptionWhenProductsAvailableThenGetAsyncReturnOk() { var sortOption = _fixture.Create <SortOption>(); var products = _fixture.Create <IEnumerable <Product> >(); _productService .Setup(x => x.FindProductsAsync(sortOption)) .ReturnsAsync(products); var actual = await _target.GetAsync(sortOption.ToString()); (actual.Result as StatusCodeResult)? .StatusCode.Should() .Be((int)HttpStatusCode.OK); }