public void SearchByNameTest_BadRequest() { // Arrange ResourcesController target = new ResourcesController(_service); // Act var actual = target.Search(null) as BadRequestResult; // Assert Assert.IsNotNull(actual); }
public void SearchByNameTest() { // Arrange ResourcesController target = new ResourcesController(_service); Resource expected = _mockdata.Resource1(); ResourceSearchCriteria criteria = new ResourceSearchCriteria() { NameStartsWith = expected.Name }; // Act var actual = target.Search(criteria) as OkObjectResult; // Assert Assert.IsNotNull(actual); }