public async Task <ActionResult <List <Case> > > Get() { List <Case> cases = await _repo.GetAllCases(); if (cases == null) { return(NotFound()); } return(cases); // TODO: Move this for possible future use // StringBuilder sb = new StringBuilder(); // foreach (ActionDescriptor ad in _actionDescriptorCollectionProvider.ActionDescriptors.Items) // { // var action = Url.Action(new UrlActionContext() // { // Action = ad.RouteValues["action"], // Controller = ad.RouteValues["controller"], // Values = ad.RouteValues // }); // sb.AppendLine(action).AppendLine().AppendLine(); // } // return Ok(sb.ToString()); }
public void CaseListIsNotEmpty() { ICaseRepository caseRepository = CaseRepository.Instance; caseRepository.Add(new Case()); caseRepository.Add(new Case()); List <ICase> listOfCases = caseRepository.GetAllCases(); Assert.IsTrue(listOfCases.Count > 0); }
public void CheckIfListHasCorrectNumberOfCases() { ICaseRepository caseRepository = CaseRepository.Instance; caseRepository.Add(new Case()); caseRepository.Add(new Case()); caseRepository.Add(new Case()); List <ICase> listOfCases = caseRepository.GetAllCases(); Assert.AreEqual(1, listOfCases.Count); }
public IEnumerable <Cases> GetAllCases() { var result = _caseRepository.GetAllCases(); return(result); }
IEnumerable <Case> ICaseService.GetAllCases() { return(_caseRepository.GetAllCases()); }
public List <ICase> GetAllCases() { return(_caseRep.GetAllCases()); }