public void NullFileTest()
        {
            var attributeValidator = new FileExtensionAttributeValidation(allowedExtension);
            var validResult        = attributeValidator.IsValid(null);

            Assert.False(validResult);
        }
        public void InjectAnotherTypeTest()
        {
            var anotherObject      = "hello";
            var attributeValidator = new FileExtensionAttributeValidation(allowedExtension);
            var validResult        = attributeValidator.IsValid(anotherObject);

            Assert.False(validResult);
        }
        public void ExtenstionAttributeNotValidTest(string fileNameTest)
        {
            var fileMock = new Mock <IFormFile>();

            fileMock.Setup(x => x.FileName).Returns(fileNameTest);

            var attributeValidator = new FileExtensionAttributeValidation(allowedExtension);

            var fileObject  = fileMock.Object;
            var validResult = attributeValidator.IsValid(fileObject);

            Assert.False(validResult);
        }