public void GetIDTest() { // Arrange var mockRepo = new Mock <IContentDetailsService>(); //mockRepo.Setup(repo => repo.ListAsync()).Returns(Task.FromResult(GetTestSessions())); var controller = new ContentDetailsController(mockRepo.Object); // Act var result = controller.GetID(3); // Assert Assert.IsType <Task <List <UserContentDetails> > >(result); }
public void GetIDTest() { // Arrange var mockRepo = new Mock <IContentDetailsService>(); var mockRepo2 = new Mock <IMapper>(); var controller = new ContentDetailsController(mockRepo.Object, mockRepo2.Object); // Act var result = controller.GetID(3); // Assert Assert.IsType <Task <List <UserContentDetails> > >(result); }