Пример #1
0
        public void ValidateImageForUpload_ImageIsContentTypeImagePng_AndSize1_ReturnTrue()
        {
            // Given
            String contentType = "image/png";

            AdImageServices service = new AdImageServices(null, null);

            // Then
            Assert.IsTrue(service.ValidateImageForUpload(contentType, 1));
        }
Пример #2
0
        public void ValidateImageForUpload_ImageIsContentTypeNot_AndSize1_ReturnFalse()
        {
            // Given
            String contentType = "appliction/json";

            AdImageServices service = new AdImageServices(null, null);

            // Then
            Assert.IsFalse(service.ValidateImageForUpload(contentType, 1));
        }
Пример #3
0
        public void ValidateImageForUpload_ImageIsContentTypeImagePng_AndSizeTooBig_ReturnFalse()
        {
            // Given
            String contentType = "image/png";

            AdImageServices service = new AdImageServices(null, null);

            // Then
            Assert.IsFalse(service.ValidateImageForUpload(contentType, 5048577));
        }