public async Task <IActionResult> AllDeleted() { var comments = await commentSerivce.GetAllDeletedAsync(); var viewModel = Mapper.Map <List <CommentAllDeletedViewModel> >(comments); return(Json(viewModel)); }
public async Task GetAllDeleted_ShouldReturnCollectionWithDeletedEntites() { var emptyCollection = await commentService.GetAllDeletedAsync(); CollectionAssert.IsEmpty(emptyCollection); await commentService.DeleteByIdAsync("1"); await commentService.DeleteByIdAsync("2"); var collection = await commentService.GetAllDeletedAsync(); CollectionAssert.IsNotEmpty(collection); Assert.IsTrue(collection.Count == 2); CollectionAssert.Contains(collection, data[0]); CollectionAssert.Contains(collection, data[1]); }