34 references to FormFile
Microsoft.AspNetCore.Components.Endpoints.Tests (13)
Binding\FormDataMapperTests.cs (13)
1904
var expected = new
FormFile
(Stream.Null, 0, 10, "file", "file.txt");
1929
new
FormFile
(Stream.Null, 0, 10, "file", "file-1.txt"),
1930
new
FormFile
(Stream.Null, 0, 20, "file", "file-2.txt"),
1931
new
FormFile
(Stream.Null, 0, 30, "file", "file-3.txt"),
1932
new
FormFile
(Stream.Null, 0, 40, "oddOneOutFile", "file-4.txt"),
1962
new
FormFile
(Stream.Null, 0, 10, "file", "file-1.txt"),
1963
new
FormFile
(Stream.Null, 0, 20, "file", "file-2.txt"),
1964
new
FormFile
(Stream.Null, 0, 30, "file", "file-3.txt"),
1965
new
FormFile
(Stream.Null, 0, 40, "oddOneOutFile", "file-4.txt"),
1988
var expected = new FormFileCollection { new
FormFile
(Stream.Null, 0, 10, "file", "file.txt") };
2011
var expected = new FormFileCollection { new
FormFile
(new MemoryStream(Encoding.UTF8.GetBytes(expectedString)), 0, expectedString.Length, "file", "file.txt") };
2042
new
FormFile
(new MemoryStream(Encoding.UTF8.GetBytes(expectedString1)), 0, expectedString1.Length, "file", "file1.txt"),
2043
new
FormFile
(new MemoryStream(Encoding.UTF8.GetBytes(expectedString2)), 0, expectedString2.Length, "file", "file2.txt")
Microsoft.AspNetCore.Http (2)
Features\FormFeature.cs (2)
268
file = new
FormFile
(_request.Body, section.BaseStreamOffset.GetValueOrDefault(), section.Body.Length, name, fileName);
273
file = new
FormFile
(section.Body, 0, section.Body.Length, name, fileName);
Microsoft.AspNetCore.Http.Extensions.Tests (3)
RequestDelegateFactoryTests.FormMapping.cs (3)
293
new
FormFile
(Stream.Null, 0, 10, "file", "file.txt"),
294
new
FormFile
(Stream.Null, 0, 10, "formFiles", "file-1.txt"),
295
new
FormFile
(Stream.Null, 0, 10, "formFiles", "file-2.txt"),
Microsoft.AspNetCore.Mvc.Core.Test (4)
ModelBinding\FormFileValueProviderFactoryTest.cs (1)
49
files.Add(new
FormFile
(Stream.Null, 0, 10, "some-name", "some-name"));
ModelBinding\FormFileValueProviderTest.cs (3)
18
formFiles.Add(new
FormFile
(Stream.Null, 0, 0, "file", fileName: null));
37
formFiles.Add(new
FormFile
(Stream.Null, 0, 10, "file", "file"));
56
formFiles.Add(new
FormFile
(Stream.Null, 0, 10, "file", "file"));
Microsoft.AspNetCore.Mvc.IntegrationTests (12)
BindingSourceMetadataProviderIntegrationTest.cs (1)
139
fileCollection.Add(new
FormFile
(memoryStream, 0, data.Length, name, fileName)
ComplexRecordIntegrationTest.cs (1)
4230
var file = new
FormFile
(memoryStream, 0, memoryStream.Length, name, fileName)
ComplexTypeIntegrationTestBase.cs (1)
3729
var file = new
FormFile
(memoryStream, 0, memoryStream.Length, name, fileName)
FormCollectionModelBindingIntegrationTest.cs (1)
166
fileCollection.Add(new
FormFile
(memoryStream, 0, data.Length, name, fileName)
FormFileModelBindingIntegrationTest.cs (4)
554
new
FormFile
(new MemoryStream(), baseStreamOffset: 0, length: 0, name: "file", fileName: "file1"),
555
new
FormFile
(new MemoryStream(), baseStreamOffset: 0, length: 0, name: "file", fileName: "file2"),
556
new
FormFile
(new MemoryStream(), baseStreamOffset: 0, length: 0, name: "file", fileName: "file3"),
1274
fileCollection.Add(new
FormFile
(memoryStream, 0, data.Length, name, fileName)
TryUpdateModelIntegrationTest.cs (4)
1055
new
FormFile
(new MemoryStream(), baseStreamOffset: 0, length: 0, name: "file", fileName: "file1"),
1056
new
FormFile
(new MemoryStream(), baseStreamOffset: 0, length: 0, name: "file", fileName: "file2"),
1057
new
FormFile
(new MemoryStream(), baseStreamOffset: 0, length: 0, name: "file", fileName: "file3"),
1285
fileCollection.Add(new
FormFile
(memoryStream, 0, data.Length, name, fileName)