public async Task AdministrationControllerTest_CreateCategoryAsync() { // Arrange var controller = new AdministrationController(service); controller.Request = new HttpRequestMessage(); controller.Configuration = new HttpConfiguration(); // Act var model = new Category() { CategoryName = "Acme Category", Description = "Acme category description" }; var result = await controller.CreateCategory(model); // Assert var response = default(ISingleModelResponse <CategoryViewModel>); result.TryGetContentValue(out response); Assert.IsNotNull(response.Model.CategoryID); }