public async Task GetTopics_ServiceInvoke() { //Act await _topicController.GetTopics(); //Assert _topicServiceMock.Verify(s => s.GetTopics()); }
public void GetTopics_ReturnSuccess() { _topics.Sort(new TopicComparer()); _topics.Reverse(); var expected = new OkObjectResult(_topics).Value; var actual = ((OkObjectResult)_topicController.GetTopics().Result).Value; Assert.AreEqual(expected, actual); }