public IHttpActionResult AllVisitors() { var visitors = _visitorService.GetAllVisitors(); if (visitors != null) { var visitorDTOs = visitors as List <VisitorDTO> ?? visitors.ToList(); if (visitorDTOs.Any()) { return(Ok(visitorDTOs)); } } return(NotFound()); }
public void WhenGettingAllVisitors_AssertReturnedCollection() { var visitors = _visitorService.GetAllVisitors(); Assert.Equal(DataInitializer.GetAllVisitors().Count, visitors.Count()); }