-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adding unit test for TusHeader
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using Xunit; | ||
|
||
namespace BirdMessenger.Test; | ||
|
||
public class TusHeadersTest | ||
{ | ||
[Theory] | ||
[InlineData(null,false)] | ||
[InlineData("",false)] | ||
[InlineData(" ",false)] | ||
[InlineData("test",false)] | ||
[InlineData(TusHeaders.TusResumable,true)] | ||
[InlineData(TusHeaders.UploadLength,true)] | ||
[InlineData(TusHeaders.UploadOffset,true)] | ||
[InlineData(TusHeaders.UploadMetadata,true)] | ||
[InlineData(TusHeaders.Location,true)] | ||
[InlineData(TusHeaders.UploadDeferLength,true)] | ||
[InlineData(TusHeaders.ContentType,true)] | ||
[InlineData(TusHeaders.UploadChecksum,true)] | ||
[InlineData(TusHeaders.UploadConcat,true)] | ||
[InlineData(TusHeaders.UploadContentTypeValue,true)] | ||
[InlineData(TusHeaders.TusVersion,true)] | ||
[InlineData(TusHeaders.TusMaxSize,true)] | ||
[InlineData(TusHeaders.TusExtension,true)] | ||
public void TestReservedWordsTest(string header, bool isReserved) | ||
{ | ||
bool isReservedTest = TusHeaders.IsReserved(header); | ||
|
||
Assert.Equal(isReserved,isReservedTest); | ||
} | ||
} |