public void RetrievingAProduct(ProductModel product, long productId) { "Given an existing product". f(() => ManagementServiceMock.Setup(m => m.GetProductAsync(productId)).ReturnsAsync(new ProductModel {Id = productId})); "When it is retrieved". f(() => { Request.RequestUri = new Uri(string.Format("{0}/{1}", ProductsUrl, productId)); Response = Client.SendAsync(Request).Result; product = Response.Content.ReadAsAsync<ProductModel>().Result; }); "Then the product should be retrieved". f(() => ManagementServiceMock.Verify(m => m.GetProductAsync(productId), Times.Once())); "And a '200 OK' status is returned". f(() => Response.StatusCode.ShouldBe(HttpStatusCode.OK)); "Then it is returned". f(() => product.ShouldNotBe(null)); "And it should have an id". f(() => product.Id.ShouldBe(productId)); }