public void ValidateImage_ReturnsFalseForNullStream()
        {
            // arrange
            var service = new ImageValidatorService();

            // act
            var result = service.ValidateImage(null);

            // assert
            Assert.False(result.isValid);
        }
        public void ValidateImage_ReturnsFalseForInvalidFileFormat()
        {
            // arrange
            var stream  = GetImageResourceStream("InvalidImage.txt");
            var service = new ImageValidatorService();

            // act
            var result = service.ValidateImage(stream);

            // assert
            Assert.False(result.isValid);
        }
        public void ValidateImage_ReturnsFalseForEmptyStream()
        {
            // arrange
            var stream  = new MemoryStream();
            var service = new ImageValidatorService();

            // act
            var result = service.ValidateImage(stream);

            // assert
            Assert.False(result.isValid);
        }
        public void ValidateImage_ReturnsMimeType()
        {
            // arrange
            var stream  = GetImageResourceStream("jpeg.jpeg");
            var service = new ImageValidatorService();

            // act
            var result = service.ValidateImage(stream);

            // assert
            Assert.Equal("image/jpeg", result.mimeType);
        }
        public void ValidateImage_ReturnsTrue()
        {
            // arrange
            var stream  = GetImageResourceStream("jpeg.jpeg");
            var service = new ImageValidatorService();

            // act
            var result = service.ValidateImage(stream);

            // assert
            Assert.True(result.isValid);
        }