示例#1
0
        public void CheckIsFileImageExtension_StringIsNull_ExcpetionThrown()
        {
            // Arrange
            var    readGeneratedImage = new ReadGeneratedImage();
            string fileContentType    = null;

            // Act and Assert exception
            Assert.Throws <ArgumentNullException>(() => readGeneratedImage.CheckIsFileImageExtension(fileContentType));
        }
示例#2
0
        public void CheckIsFileImageExtension_StringIsImageJpeg_ReturnTrue()
        {
            // Arrange
            var    readGeneratedImage = new ReadGeneratedImage();
            string fileContentType    = "image/jpeg";
            var    expectedResult     = true;

            // Act
            var actualResult = readGeneratedImage.CheckIsFileImageExtension(fileContentType);

            // Assert
            Assert.AreEqual(expectedResult, actualResult);
        }
示例#3
0
        public void CheckIsFileImageExtension_StringIsTextPlain_ReturnFalse()
        {
            // Arrange
            var    readGeneratedImage = new ReadGeneratedImage();
            string fileContentType    = "text/plain";
            var    expectedResult     = false;

            // Act
            var actualResult = readGeneratedImage.CheckIsFileImageExtension(fileContentType);

            // Assert
            Assert.AreEqual(expectedResult, actualResult);
        }