mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 01:54:42 +01:00
Move non-jellyfin extensions to separate project
This commit is contained in:
18
tests/Jellyfin.Extensions.Tests/StringExtensionsTests.cs
Normal file
18
tests/Jellyfin.Extensions.Tests/StringExtensionsTests.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using Xunit;
|
||||
|
||||
namespace Jellyfin.Extensions.Tests
|
||||
{
|
||||
public class StringExtensionsTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData("", '_', 0)]
|
||||
[InlineData("___", '_', 3)]
|
||||
[InlineData("test\x00", '\x00', 1)]
|
||||
[InlineData("Imdb=tt0119567|Tmdb=330|TmdbCollection=328", '|', 2)]
|
||||
public void ReadOnlySpan_Count_Success(string str, char needle, int count)
|
||||
{
|
||||
Assert.Equal(count, str.AsSpan().Count(needle));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user