fix StyleCop warning in Jellyfin.MediaEncoding.Tests
This commit is contained in:
parent
bf5b21e67b
commit
4cb8fbfbbf
|
@ -9,20 +9,6 @@ namespace Jellyfin.MediaEncoding.Tests
|
||||||
{
|
{
|
||||||
public class EncoderValidatorTests
|
public class EncoderValidatorTests
|
||||||
{
|
{
|
||||||
private class GetFFmpegVersionTestData : IEnumerable<object?[]>
|
|
||||||
{
|
|
||||||
public IEnumerator<object?[]> GetEnumerator()
|
|
||||||
{
|
|
||||||
yield return new object?[] { EncoderValidatorTestsData.FFmpegV421Output, new Version(4, 2, 1) };
|
|
||||||
yield return new object?[] { EncoderValidatorTestsData.FFmpegV42Output, new Version(4, 2) };
|
|
||||||
yield return new object?[] { EncoderValidatorTestsData.FFmpegV414Output, new Version(4, 1, 4) };
|
|
||||||
yield return new object?[] { EncoderValidatorTestsData.FFmpegV404Output, new Version(4, 0, 4) };
|
|
||||||
yield return new object?[] { EncoderValidatorTestsData.FFmpegGitUnknownOutput, null };
|
|
||||||
}
|
|
||||||
|
|
||||||
IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
|
|
||||||
}
|
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[ClassData(typeof(GetFFmpegVersionTestData))]
|
[ClassData(typeof(GetFFmpegVersionTestData))]
|
||||||
public void GetFFmpegVersionTest(string versionOutput, Version? version)
|
public void GetFFmpegVersionTest(string versionOutput, Version? version)
|
||||||
|
@ -41,5 +27,19 @@ namespace Jellyfin.MediaEncoding.Tests
|
||||||
var val = new EncoderValidator(new NullLogger<EncoderValidatorTests>());
|
var val = new EncoderValidator(new NullLogger<EncoderValidatorTests>());
|
||||||
Assert.Equal(valid, val.ValidateVersionInternal(versionOutput));
|
Assert.Equal(valid, val.ValidateVersionInternal(versionOutput));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private class GetFFmpegVersionTestData : IEnumerable<object?[]>
|
||||||
|
{
|
||||||
|
public IEnumerator<object?[]> GetEnumerator()
|
||||||
|
{
|
||||||
|
yield return new object?[] { EncoderValidatorTestsData.FFmpegV421Output, new Version(4, 2, 1) };
|
||||||
|
yield return new object?[] { EncoderValidatorTestsData.FFmpegV42Output, new Version(4, 2) };
|
||||||
|
yield return new object?[] { EncoderValidatorTestsData.FFmpegV414Output, new Version(4, 1, 4) };
|
||||||
|
yield return new object?[] { EncoderValidatorTestsData.FFmpegV404Output, new Version(4, 0, 4) };
|
||||||
|
yield return new object?[] { EncoderValidatorTestsData.FFmpegGitUnknownOutput, null };
|
||||||
|
}
|
||||||
|
|
||||||
|
IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
<ItemGroup Condition=" '$(Configuration)' == 'Debug' ">
|
<ItemGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8" PrivateAssets="All" />
|
||||||
<PackageReference Include="SerilogAnalyzer" Version="0.15.0" PrivateAssets="All" />
|
<PackageReference Include="SerilogAnalyzer" Version="0.15.0" PrivateAssets="All" />
|
||||||
<!-- <PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All" /> SA1201 -->
|
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All" />
|
||||||
<PackageReference Include="SmartAnalyzers.MultithreadingAnalyzer" Version="1.1.31" PrivateAssets="All" />
|
<PackageReference Include="SmartAnalyzers.MultithreadingAnalyzer" Version="1.1.31" PrivateAssets="All" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user