Esempio n. 1
0
        public void ShouldCallWithProvidedParameters()
        {
            _mockSearchProvider.Setup(m => m.SearchByKeyword(It.IsAny <string>(), It.IsAny <int>(), It.IsAny <int>(), It.IsAny <int>(), It.IsAny <List <int> >()));
            var standardSearchProvider = new ApprenticeshipSearchService(_mockSearchProvider.Object, _mockLogger.Object, _mockPaginationSettings.Object);

            standardSearchProvider.SearchByKeyword("test", 1, 2, 0, null);

            _mockSearchProvider.Verify(x => x.SearchByKeyword("test", 1, 2, 0, null));
        }
Esempio n. 2
0
        public void ShouldDefaultTakeTo10When0()
        {
            _mockSearchProvider.Setup(m => m.SearchByKeyword(It.IsAny <string>(), It.IsAny <int>(), It.IsAny <int>(), It.IsAny <int>(), It.IsAny <List <int> >()));
            _mockPaginationSettings.Setup(x => x.DefaultResultsAmount).Returns(10);
            var standardSearchProvider = new ApprenticeshipSearchService(_mockSearchProvider.Object, _mockLogger.Object, _mockPaginationSettings.Object);

            standardSearchProvider.SearchByKeyword("test", 0, 0, 0, null);

            _mockSearchProvider.Verify(x => x.SearchByKeyword("test", 0, 10, 0, null));
        }