예제 #1
0
        public void InputFilesAdd()
        {
            var file = new Mock <IFormFile>();

            file.Setup(x1 => x1.Name).Returns("abc");
            var x = new InputElement
            {
                Type = "file"
            };

            x.AddFile(file.Object);
            Assert.Single(x.Files);
            var found = x.Files[0];

            Assert.Equal("abc", found.Name);
        }