Пример #1
0
        public void SearchImages_SearchTextNull_ThrowsArgumentNullException2()
        {
            int count = 2;
            var logic = new ImageLogic(new DummyImageManager(count));

            Assert.ThrowsException <ArgumentNullException>(() => logic.SearchImages(null));
        }
Пример #2
0
        public void SearchImages_ValidSearchText_ReturnsCorrectResult(string searchText, int expectedResults)
        {
            int count = 20;
            var logic = new ImageLogic(new DummyImageManager(count));

            var images = logic.SearchImages(searchText);

            Assert.AreEqual(expectedResults, images.Count());
        }
Пример #3
0
        public void SearchImages_SearchTextEmpty_ReturnsAllImages()
        {
            int count = 2;
            var logic = new ImageLogic(new DummyImageManager(count));

            var images = logic.SearchImages(string.Empty);

            Assert.AreEqual(count, images.Count());
        }
Пример #4
0
        public void SearchImages_SearchTextNull_ThrowsArgumentNullException()
        {
            var logic = new ImageLogic(new DummyImageManager(2));

            logic.SearchImages(null);
        }