public void TestcatControllerGetAll() { // Arrange var controller = new CategoryBaseController { Request = new HttpRequestMessage(), Configuration = new HttpConfiguration() }; // Act var response = controller.GetAll() as OkNegotiatedContentResult <IEnumerable <Category> >; // Assert Assert.IsNotNull(response); }
public void TestcatControllerGetByID() { // Arrange var controller = new CategoryBaseController { Request = new HttpRequestMessage(), Configuration = new HttpConfiguration() }; var id = Guid.Empty; Guid.TryParse("f7fdd643-9b4f-4723-acd4-e5af80a430e2", out id); // Act var response = controller.GetByID(id) as OkNegotiatedContentResult <Category>; // Assert Assert.IsNotNull(response); }