コード例 #1
0
        public void WordsGetTest()
        {
            InitConfiguration();
            var wordCtrl       = new WordsController(_configuration, _logger);
            var outputResponse = wordCtrl.Get();

            Assert.IsTrue(outputResponse == 2, "Expected rows not found");
        }
コード例 #2
0
        public void WhenGetIsCalledRepositoryGetMethodIsCalledOnce()
        {
            var mockRepository = new Mock <IWordRepository>();
            var sut            = new WordsController(mockRepository.Object);

            sut.Get();

            mockRepository.Verify(x => x.GetTop(100));
        }