public void ThoughtService_DeleteThought_GetAllDoesntContainsIt() { // arrange IThoughtService service = GetServiceInstance(); ThoughtModel thought = GetRandomThought(); // act service.Create(thought); Assert.Contains(service.GetAll(), t => t.Id == thought.Id); service.Delete(thought.Id); // assert Assert.DoesNotContain(service.GetAll(), t => t.Id == thought.Id); }
public IActionResult All() { var thoughts = _thoughtService.GetAll(); var viewModel = GetBackofficeRoomViewModel(thoughts); return(View(BackofficeRoomViewPath, viewModel)); }
public void ThoughtService_SaveNewThought_GetAllContainsIt() { // arrange IThoughtService service = GetServiceInstance(); ThoughtModel thought = GetRandomThought(); // act service.Save(thought); // assert Assert.Contains(service.GetAll(), t => t.Id == thought.Id); }
private IEnumerable <ThoughtViewModel> GetFeed() { return(_thoughtService.GetAll().Map <IEnumerable <ThoughtViewModel> >()); }