public void WordsGetTest() { InitConfiguration(); var wordCtrl = new WordsController(_configuration, _logger); var outputResponse = wordCtrl.Get(); Assert.IsTrue(outputResponse == 2, "Expected rows not found"); }
public void WhenGetIsCalledRepositoryGetMethodIsCalledOnce() { var mockRepository = new Mock <IWordRepository>(); var sut = new WordsController(mockRepository.Object); sut.Get(); mockRepository.Verify(x => x.GetTop(100)); }