public void GetProductListNoContentTest() { // Arrange ProductApiController controller = new ProductApiController(); controller.Request = new HttpRequestMessage(); controller.Configuration = new HttpConfiguration(); // Act var response = controller.GetProductList(); // Assert Assert.IsNotNull(response); Assert.AreEqual(System.Net.HttpStatusCode.NoContent, response.StatusCode); }