public void GetWasteContainersTest() { int count = _memoryDbContext.Containers.Count(); Assert.IsTrue(count == _wasteContainerService.GetWasteContainers().Count); Assert.IsTrue(_wasteContainerService.GetWasteContainers("name", SearchNameString).Count > 0); }
public IActionResult Index(string columnName, string searchString) { searchString = String.IsNullOrEmpty(searchString) ? String.Empty : searchString; columnName = String.IsNullOrEmpty(columnName) ? String.Empty : columnName; ViewData["CurrentFilter"] = searchString; ViewData["CurrentColumn"] = columnName; try { return(View(_wasteContainerService.GetWasteContainers(columnName, searchString))); } catch (Exception ex) { _logger.LogError(ex, ex.Message); return(NotFound(ex.Message)); } }