mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-05 21:37:10 -04:00
Use TheoryData in UrlDecodeQueryFeatureTest
This commit is contained in:
parent
00f7f68e53
commit
c5393b2579
@ -10,11 +10,18 @@ namespace Jellyfin.Server.Tests
|
|||||||
{
|
{
|
||||||
public static class UrlDecodeQueryFeatureTests
|
public static class UrlDecodeQueryFeatureTests
|
||||||
{
|
{
|
||||||
|
public static TheoryData<string, string> EmptyValueTest_TestData()
|
||||||
|
{
|
||||||
|
var data = new TheoryData<string, string>();
|
||||||
|
data.Add("e0a72cb2a2c7", "e0a72cb2a2c7"); // isn't encoded
|
||||||
|
data.Add("random+test", "random test"); // encoded
|
||||||
|
data.Add("random%20test", "random test"); // encoded
|
||||||
|
data.Add("++", " "); // encoded
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData("e0a72cb2a2c7", "e0a72cb2a2c7")] // isn't encoded
|
[MemberData(nameof(EmptyValueTest_TestData))]
|
||||||
[InlineData("random+test", "random test")] // encoded
|
|
||||||
[InlineData("random%20test", "random test")] // encoded
|
|
||||||
[InlineData("++", " ")] // encoded
|
|
||||||
public static void EmptyValueTest(string query, string key)
|
public static void EmptyValueTest(string query, string key)
|
||||||
{
|
{
|
||||||
var dict = new Dictionary<string, StringValues>
|
var dict = new Dictionary<string, StringValues>
|
||||||
|
Loading…
Reference in New Issue
Block a user