Skip to content

Commit e7cce7d

Browse files
committed
Fix typo in unit tests
1 parent 6083426 commit e7cce7d

8 files changed

Lines changed: 62 additions & 62 deletions

File tree

Source/HttpMultipartParser.UnitTests/ParserScenarios/ExactBufferTruncate.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ namespace HttpMultipartParser.UnitTests.ParserScenarios
1212
public class ExactBufferTruncate
1313
{
1414
private static readonly string _testData = TestUtil.TrimAllLines(
15-
@"--boundry
15+
@"--boundary
1616
Content-Disposition: form-data; name=""text""
1717
1818
textdata
19-
--boundry
19+
--boundary
2020
Content-Disposition: form-data; name=""file""; filename=""data.txt""
2121
Content-Type: text/plain
2222
2323
1234567890123456789012
24-
--boundry--"
24+
--boundary--"
2525
);
2626

2727
/// <summary>
@@ -54,7 +54,7 @@ public void CanHandleFinalDashesInSeperateBufferFromEndBinary()
5454
{
5555
using (Stream stream = TestUtil.StringToStream(_testCase.Request, Encoding.UTF8))
5656
{
57-
var parser = MultipartFormDataParser.Parse(stream, "boundry", Encoding.UTF8, 16);
57+
var parser = MultipartFormDataParser.Parse(stream, "boundary", Encoding.UTF8, 16);
5858
Assert.True(_testCase.Validate(parser));
5959
}
6060
}
@@ -67,7 +67,7 @@ public async Task CanHandleFinalDashesInSeperateBufferFromEndBinaryAsync()
6767
{
6868
using (Stream stream = TestUtil.StringToStream(_testCase.Request, Encoding.UTF8))
6969
{
70-
var parser = await MultipartFormDataParser.ParseAsync(stream, "boundry", Encoding.UTF8, 16).ConfigureAwait(false);
70+
var parser = await MultipartFormDataParser.ParseAsync(stream, "boundary", Encoding.UTF8, 16).ConfigureAwait(false);
7171
Assert.True(_testCase.Validate(parser));
7272
}
7373
}

Source/HttpMultipartParser.UnitTests/ParserScenarios/MultipleFilesWithEmptyName.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@ namespace HttpMultipartParser.UnitTests.ParserScenarios
1313
public class MultipleFilesWithEmptyName
1414
{
1515
private static readonly string _testData = TestUtil.TrimAllLines(
16-
@"--boundry
16+
@"--boundary
1717
Content-Disposition: form-data; name="""";filename=""file1.txt"";
1818
Content-Type: text/plain
1919
2020
THIS IS TEXT FILE 1
21-
--boundry
21+
--boundary
2222
Content-Disposition: form-data; name="""";filename=""file2.txt"";
2323
Content-Type: text/plain
2424
2525
THIS IS TEXT FILE 2 !!!
26-
--boundry
26+
--boundary
2727
Content-Disposition: form-data; name="""";filename=""file3.txt"";
2828
Content-Type: text/plain
2929
3030
This is text file 3 1234567890
31-
--boundry--"
31+
--boundary--"
3232
);
3333

3434
private static readonly TestData _testCase = new TestData(
@@ -54,7 +54,7 @@ public void MultipleFilesWithNoNameTest()
5454
{
5555
using (Stream stream = TestUtil.StringToStream(_testCase.Request, Encoding.UTF8))
5656
{
57-
var parser = MultipartFormDataParser.Parse(stream, "boundry", Encoding.UTF8, 16);
57+
var parser = MultipartFormDataParser.Parse(stream, "boundary", Encoding.UTF8, 16);
5858
Assert.True(_testCase.Validate(parser));
5959
}
6060
}
@@ -64,7 +64,7 @@ public async Task MultipleFilesWithNoNameAsync()
6464
{
6565
using (Stream stream = TestUtil.StringToStream(_testCase.Request, Encoding.UTF8))
6666
{
67-
var parser = await MultipartFormDataParser.ParseAsync(stream, "boundry", Encoding.UTF8, 16).ConfigureAwait(false);
67+
var parser = await MultipartFormDataParser.ParseAsync(stream, "boundary", Encoding.UTF8, 16).ConfigureAwait(false);
6868
Assert.True(_testCase.Validate(parser));
6969
}
7070
}

Source/HttpMultipartParser.UnitTests/ParserScenarios/MultipleFilesWithOmittedName.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@ namespace HttpMultipartParser.UnitTests.ParserScenarios
1313
public class MultipleFilesWithOmittedName
1414
{
1515
private static readonly string _testData = TestUtil.TrimAllLines(
16-
@"--boundry
16+
@"--boundary
1717
Content-Disposition: form-data; filename=""file1.txt"";
1818
Content-Type: text/plain
1919
2020
THIS IS TEXT FILE 1
21-
--boundry
21+
--boundary
2222
Content-Disposition: form-data; filename=""file2.txt"";
2323
Content-Type: text/plain
2424
2525
THIS IS TEXT FILE 2 !!!
26-
--boundry
26+
--boundary
2727
Content-Disposition: form-data; filename=""file3.txt"";
2828
Content-Type: text/plain
2929
3030
This is text file 3 1234567890
31-
--boundry--"
31+
--boundary--"
3232
);
3333

3434
private static readonly TestData _testCase = new TestData(
@@ -54,7 +54,7 @@ public void MultipleFilesWithOmittedNameTest()
5454
{
5555
using (Stream stream = TestUtil.StringToStream(_testCase.Request, Encoding.UTF8))
5656
{
57-
var parser = MultipartFormDataParser.Parse(stream, "boundry", Encoding.UTF8, 16);
57+
var parser = MultipartFormDataParser.Parse(stream, "boundary", Encoding.UTF8, 16);
5858
Assert.True(_testCase.Validate(parser));
5959
}
6060
}
@@ -64,7 +64,7 @@ public async Task MultipleFilesWithOmittedNameAsync()
6464
{
6565
using (Stream stream = TestUtil.StringToStream(_testCase.Request, Encoding.UTF8))
6666
{
67-
var parser = await MultipartFormDataParser.ParseAsync(stream, "boundry", Encoding.UTF8, 16).ConfigureAwait(false);
67+
var parser = await MultipartFormDataParser.ParseAsync(stream, "boundary", Encoding.UTF8, 16).ConfigureAwait(false);
6868
Assert.True(_testCase.Validate(parser));
6969
}
7070
}

Source/HttpMultipartParser.UnitTests/ParserScenarios/MultipleFilesWithSameName.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@ namespace HttpMultipartParser.UnitTests.ParserScenarios
1313
public class MultipleFilesWithSameName
1414
{
1515
private static readonly string _testData = TestUtil.TrimAllLines(
16-
@"--boundry
16+
@"--boundary
1717
Content-Disposition: form-data; name=""file1.txt"";filename=""file1.txt"";
1818
Content-Type: text/plain
1919
2020
THIS IS TEXT FILE 1
21-
--boundry
21+
--boundary
2222
Content-Disposition: form-data; name=""file2.txt"";filename=""file2.txt"";
2323
Content-Type: text/plain
2424
2525
THIS IS TEXT FILE 2 !!!
26-
--boundry
26+
--boundary
2727
Content-Disposition: form-data; name=""file2.txt"";filename=""file2.txt"";
2828
Content-Type: text/plain
2929
3030
This is text file 3 1234567890
31-
--boundry--"
31+
--boundary--"
3232
);
3333

3434
private static readonly TestData _testCase = new TestData(
@@ -54,7 +54,7 @@ public void MultipleFilesWithSameNameTest()
5454
{
5555
using (Stream stream = TestUtil.StringToStream(_testCase.Request, Encoding.UTF8))
5656
{
57-
var parser = MultipartFormDataParser.Parse(stream, "boundry", Encoding.UTF8, 16);
57+
var parser = MultipartFormDataParser.Parse(stream, "boundary", Encoding.UTF8, 16);
5858
Assert.True(_testCase.Validate(parser));
5959
}
6060
}
@@ -64,7 +64,7 @@ public async Task MultipleFilesWithSameNameTestAsync()
6464
{
6565
using (Stream stream = TestUtil.StringToStream(_testCase.Request, Encoding.UTF8))
6666
{
67-
var parser = await MultipartFormDataParser.ParseAsync(stream, "boundry", Encoding.UTF8, 16).ConfigureAwait(false);
67+
var parser = await MultipartFormDataParser.ParseAsync(stream, "boundary", Encoding.UTF8, 16).ConfigureAwait(false);
6868
Assert.True(_testCase.Validate(parser));
6969
}
7070
}

Source/HttpMultipartParser.UnitTests/ParserScenarios/MultipleParamsAndFiles.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,33 @@ namespace HttpMultipartParser.UnitTests.ParserScenarios
1212
public class MultipleParamsAndFiles
1313
{
1414
private static readonly string _testData = TestUtil.TrimAllLines(
15-
@"--boundry
15+
@"--boundary
1616
Content-Disposition: form-data; name=""text""
1717
1818
textdata
19-
--boundry
19+
--boundary
2020
Content-Disposition: form-data; name=""after"";TestForTextWithoutSplit
2121
2222
afterdata
23-
--boundry
23+
--boundary
2424
Content-Disposition: form-data; name=""file""; filename=""data.txt""
2525
Content-Type: text/plain
2626
2727
I am the first data
28-
--boundry
28+
--boundary
2929
Content-Disposition: form-data;TestForTextWithoutSplit; name=""newfile""; filename=""superdata.txt""
3030
Content-Type: text/plain
3131
3232
I am the second data
33-
--boundry
33+
--boundary
3434
Content-Disposition: form-data; name=""never""
3535
3636
neverdata
37-
--boundry
37+
--boundary
3838
Content-Disposition: form-data; name=""waylater""
3939
4040
waylaterdata
41-
--boundry--"
41+
--boundary--"
4242
);
4343

4444
private static readonly TestData _testCase = new TestData(
@@ -68,7 +68,7 @@ public void MultipleFilesAndParamsTest()
6868
{
6969
using (Stream stream = TestUtil.StringToStream(_testCase.Request, Encoding.UTF8))
7070
{
71-
var parser = MultipartFormDataParser.Parse(stream, "boundry", Encoding.UTF8, 16);
71+
var parser = MultipartFormDataParser.Parse(stream, "boundary", Encoding.UTF8, 16);
7272
Assert.True(_testCase.Validate(parser));
7373
}
7474
}
@@ -78,7 +78,7 @@ public async Task MultipleFilesAndParamsTestAsync()
7878
{
7979
using (Stream stream = TestUtil.StringToStream(_testCase.Request, Encoding.UTF8))
8080
{
81-
var parser = await MultipartFormDataParser.ParseAsync(stream, "boundry", Encoding.UTF8, 16).ConfigureAwait(false);
81+
var parser = await MultipartFormDataParser.ParseAsync(stream, "boundary", Encoding.UTF8, 16).ConfigureAwait(false);
8282
Assert.True(_testCase.Validate(parser));
8383
}
8484
}

Source/HttpMultipartParser.UnitTests/ParserScenarios/SingleFile.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ namespace HttpMultipartParser.UnitTests.ParserScenarios
99
public class SingleFile
1010
{
1111
private static readonly string _testData = TestUtil.TrimAllLines(
12-
@"--boundry
12+
@"--boundary
1313
Content-Disposition: form-data; name=""file""; filename=""data.txt"";
1414
Content-Type: text/plain
1515
1616
I am the first data1
17-
--boundry--"
17+
--boundary--"
1818
);
1919

2020
/// <summary>
@@ -45,7 +45,7 @@ public void SingleFileTest()
4545
{
4646
using (Stream stream = TestUtil.StringToStream(_testCase.Request, Encoding.UTF8))
4747
{
48-
var parser = MultipartFormDataParser.Parse(stream, "boundry", Encoding.UTF8, 16);
48+
var parser = MultipartFormDataParser.Parse(stream, "boundary", Encoding.UTF8, 16);
4949
Assert.True(_testCase.Validate(parser));
5050
}
5151
}
@@ -55,7 +55,7 @@ public async Task SingleFileTest_Async()
5555
{
5656
using (Stream stream = TestUtil.StringToStream(_testCase.Request, Encoding.UTF8))
5757
{
58-
var parser = await MultipartFormDataParser.ParseAsync(stream, "boundry", Encoding.UTF8, 16).ConfigureAwait(false);
58+
var parser = await MultipartFormDataParser.ParseAsync(stream, "boundary", Encoding.UTF8, 16).ConfigureAwait(false);
5959
Assert.True(_testCase.Validate(parser));
6060
}
6161
}

Source/HttpMultipartParser.UnitTests/ParserScenarios/SmallData.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ public void SmallDataTest()
5858
{
5959
using (Stream stream = TestUtil.StringToStream(_testCase.Request))
6060
{
61-
// The boundry is missing the first two -- in accordance with the multipart
62-
// spec. (A -- is added by the parser, this boundry is what would be sent in the
61+
// The boundary is missing the first two -- in accordance with the multipart
62+
// spec. (A -- is added by the parser, this boundary is what would be sent in the
6363
// request header)
6464
var parser = MultipartFormDataParser.Parse(stream, "---------------------------265001916915724");
6565
Assert.True(_testCase.Validate(parser));
@@ -71,8 +71,8 @@ public async Task SmallDataTestAsync()
7171
{
7272
using (Stream stream = TestUtil.StringToStream(_testCase.Request))
7373
{
74-
// The boundry is missing the first two -- in accordance with the multipart
75-
// spec. (A -- is added by the parser, this boundry is what would be sent in the
74+
// The boundary is missing the first two -- in accordance with the multipart
75+
// spec. (A -- is added by the parser, this boundary is what would be sent in the
7676
// requset header)
7777
var parser = await MultipartFormDataParser.ParseAsync(stream, "---------------------------265001916915724").ConfigureAwait(false);
7878
Assert.True(_testCase.Validate(parser));

0 commit comments

Comments
 (0)