public void OnActionExecuting_FileDataIsValid_ContextResultIsNull()
        {
            // Arrange
            _mockFormFile.Setup(p => p.ContentType).Returns("application/pdf");
            _mockFormFile.Setup(p => p.Length).Returns(1000);

            var context = CreateActionExecutingContext(_mockFormFile.Object);
            var fileValidationFilter = new FileValidationFilterAttribute();

            // Act
            fileValidationFilter.OnActionExecuting(context);

            // Assert
            Assert.Null(context.Result);
        }
        public void OnActionExecuting_FileContentTypeIsIncorrect_ContextResultHasBadRequestObjectResult()
        {
            // Arrange
            _mockFormFile.Setup(p => p.ContentType).Returns("application/jpeg");
            _mockFormFile.Setup(p => p.Length).Returns(1000);

            var context = CreateActionExecutingContext(_mockFormFile.Object);
            var fileValidationFilter = new FileValidationFilterAttribute();

            // Act
            fileValidationFilter.OnActionExecuting(context);

            // Assert
            var actual = context.Result as BadRequestObjectResult;

            Assert.NotNull(actual);
        }