public async Task DelTest() { // Arrange var mockRepo = new Mock <IContentDetailsService>(); //mockRepo.Setup(repo => repo.ListAsync()).Returns(Task.FromResult(GetTestSessions())); var controller = new ContentDetailsController(mockRepo.Object); // Act var result = await controller.Del(5); // Assert Assert.IsType <int>(result); }
public async Task DelTest() { // Arrange var mockRepo = new Mock <IContentDetailsService>(); var mockRepo2 = new Mock <IMapper>(); var controller = new ContentDetailsController(mockRepo.Object, mockRepo2.Object); // Act var result = await controller.Del(5); // Assert Assert.IsType <int>(result); }