mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-22 16:46:54 +01:00
Cover more branches
This commit is contained in:
@@ -9,7 +9,7 @@ namespace Jellyfin.Common.Tests.Extensions
|
||||
[Theory]
|
||||
[InlineData("Banana split", ' ', "Banana")]
|
||||
[InlineData("Banana split", 'q', "Banana split")]
|
||||
public void LeftPartCharTest(string str, char needle, string result)
|
||||
public void LeftPart_ValidArgsCharNeedle_Correct(string str, char needle, string result)
|
||||
{
|
||||
Assert.Equal(result, str.AsSpan().LeftPart(needle).ToString());
|
||||
}
|
||||
@@ -17,7 +17,7 @@ namespace Jellyfin.Common.Tests.Extensions
|
||||
[Theory]
|
||||
[InlineData("Banana split", " ", "Banana")]
|
||||
[InlineData("Banana split test", " split", "Banana")]
|
||||
public void LeftPartWithoutStringComparisonTest(string str, string needle, string result)
|
||||
public void LeftPart_ValidArgsWithoutStringComparison_Correct(string str, string needle, string result)
|
||||
{
|
||||
Assert.Equal(result, str.AsSpan().LeftPart(needle).ToString());
|
||||
}
|
||||
@@ -27,7 +27,7 @@ namespace Jellyfin.Common.Tests.Extensions
|
||||
[InlineData("Banana split test", " split", StringComparison.Ordinal, "Banana")]
|
||||
[InlineData("Banana split test", " Split", StringComparison.Ordinal, "Banana split test")]
|
||||
[InlineData("Banana split test", " Splït", StringComparison.InvariantCultureIgnoreCase, "Banana split test")]
|
||||
public void LeftPartTest(string str, string needle, StringComparison stringComparison, string result)
|
||||
public void LeftPart_ValidArgs_Correct(string str, string needle, StringComparison stringComparison, string result)
|
||||
{
|
||||
Assert.Equal(result, str.AsSpan().LeftPart(needle, stringComparison).ToString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user