コード例 #1
0
        public void CallSearchAndGetData_WhenSearchIsFalse()
        {
            //Arrange
            var statServiceMock = new Mock <IStatisticsService>();

            var controller = new StatisticsController(statServiceMock.Object);

            var _search = false;
            var rows    = It.IsAny <int>();
            var pages   = It.IsAny <int>();
            var filters = It.IsAny <string>();

            // Act
            controller.DataProviderForTable(_search, rows, pages, filters);

            // Assert
            statServiceMock.Verify(m => m.GetDataFromServer(rows, pages), Times.Once);
        }