예제 #1
0
        public void ImageCheck_WhenImagePathIsNull_ThenShouldBeArgumentNullException(string imagePath)
        {
            IImageServices imageServices = new ImageServices();
            var            result        = Record.Exception(() => imageServices.ImageCheck(imagePath));

            Assert.NotNull(result);
            var          exception = Assert.IsType <ArgumentNullException>(result);
            var          actual    = exception.ParamName;
            const string expected  = "imagePath";

            Assert.Equal(expected, actual);
        }
예제 #2
0
        public void ImageCheck_WhenImagePathsIsNull_ThenShouldBeArgumentNullException(List <string> imagePaths)
        {
            IImageServices imageServices  = new ImageServices();
            var            notFoundedUrls = new List <string>();
            var            result         = Record.Exception(() => imageServices.ImageCheck(imagePaths, out notFoundedUrls));

            Assert.NotNull(result);
            var          exception = Assert.IsType <ArgumentNullException>(result);
            var          actual    = exception.ParamName;
            const string expected  = "imagePaths";

            Assert.Equal(expected, actual);
        }