From 2d1bd8fed8dbf347ca7190d1f3a2be1ca99ec17c Mon Sep 17 00:00:00 2001 From: genteure Date: Sat, 14 Jan 2023 23:00:40 +0800 Subject: [PATCH] misc: update dependencies --- BililiveRecorder.Core/BililiveRecorder.Core.csproj | 4 ++-- BililiveRecorder.Flv/BililiveRecorder.Flv.csproj | 4 ++-- BililiveRecorder.WPF/BililiveRecorder.WPF.csproj | 4 ++-- .../BililiveRecorder.Core.UnitTests.csproj | 6 +++--- .../Expectations/PublicApi.HasNoChangesAsync.verified.txt | 1 - test/BililiveRecorder.Core.UnitTests/PublicApi.cs | 2 +- test/BililiveRecorder.Core.UnitTests/VerifyConfig.cs | 3 ++- .../BililiveRecorder.Flv.Tests.csproj | 6 +++--- .../Expectations/PublicApi.HasNoChangesAsync.verified.txt | 3 +-- test/BililiveRecorder.Flv.Tests/FlvTests/ParserTest.cs | 2 +- test/BililiveRecorder.Flv.Tests/FlvTests/WriterTests.cs | 7 ++----- test/BililiveRecorder.Flv.Tests/PublicApi.cs | 2 +- .../RuleTests/FfmpegDetectionRuleTests.cs | 2 +- .../RuleTests/IntegratedGoodTests.cs | 4 ++-- test/BililiveRecorder.Flv.Tests/VerifyConfig.cs | 3 ++- test/data | 2 +- 16 files changed, 26 insertions(+), 29 deletions(-) diff --git a/BililiveRecorder.Core/BililiveRecorder.Core.csproj b/BililiveRecorder.Core/BililiveRecorder.Core.csproj index 4cd81bf..7812956 100644 --- a/BililiveRecorder.Core/BililiveRecorder.Core.csproj +++ b/BililiveRecorder.Core/BililiveRecorder.Core.csproj @@ -12,7 +12,7 @@ - + @@ -24,7 +24,7 @@ - + diff --git a/BililiveRecorder.Flv/BililiveRecorder.Flv.csproj b/BililiveRecorder.Flv/BililiveRecorder.Flv.csproj index 394631b..1fda089 100644 --- a/BililiveRecorder.Flv/BililiveRecorder.Flv.csproj +++ b/BililiveRecorder.Flv/BililiveRecorder.Flv.csproj @@ -14,12 +14,12 @@ - + all runtime; build; native; contentfiles; analyzers - + diff --git a/BililiveRecorder.WPF/BililiveRecorder.WPF.csproj b/BililiveRecorder.WPF/BililiveRecorder.WPF.csproj index 3d2f167..f91573e 100644 --- a/BililiveRecorder.WPF/BililiveRecorder.WPF.csproj +++ b/BililiveRecorder.WPF/BililiveRecorder.WPF.csproj @@ -360,10 +360,10 @@ all - 3.23.1 + 3.26.0 - 3.23.1 + 3.26.0 2.0.2 diff --git a/test/BililiveRecorder.Core.UnitTests/BililiveRecorder.Core.UnitTests.csproj b/test/BililiveRecorder.Core.UnitTests/BililiveRecorder.Core.UnitTests.csproj index 8d0f7c5..742b1e5 100644 --- a/test/BililiveRecorder.Core.UnitTests/BililiveRecorder.Core.UnitTests.csproj +++ b/test/BililiveRecorder.Core.UnitTests/BililiveRecorder.Core.UnitTests.csproj @@ -10,9 +10,9 @@ - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/test/BililiveRecorder.Core.UnitTests/Expectations/PublicApi.HasNoChangesAsync.verified.txt b/test/BililiveRecorder.Core.UnitTests/Expectations/PublicApi.HasNoChangesAsync.verified.txt index a435482..abeb1a0 100644 --- a/test/BililiveRecorder.Core.UnitTests/Expectations/PublicApi.HasNoChangesAsync.verified.txt +++ b/test/BililiveRecorder.Core.UnitTests/Expectations/PublicApi.HasNoChangesAsync.verified.txt @@ -1,5 +1,4 @@ [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("BililiveRecorder.Core.UnitTests")] -[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName="")] namespace BililiveRecorder.Core.Api { public interface IHttpClientAccessor diff --git a/test/BililiveRecorder.Core.UnitTests/PublicApi.cs b/test/BililiveRecorder.Core.UnitTests/PublicApi.cs index d937521..97e7c58 100644 --- a/test/BililiveRecorder.Core.UnitTests/PublicApi.cs +++ b/test/BililiveRecorder.Core.UnitTests/PublicApi.cs @@ -11,7 +11,7 @@ namespace BililiveRecorder.Core.UnitTests [Fact] public Task HasNoChangesAsync() { - var publicApi = typeof(Recorder).Assembly.GeneratePublicApi(); + var publicApi = typeof(Recorder).Assembly.GeneratePublicApi(new ApiGeneratorOptions { ExcludeAttributes = new[] { "System.Runtime.Versioning.TargetFrameworkAttribute" } }); return Verifier.Verify(publicApi); } } diff --git a/test/BililiveRecorder.Core.UnitTests/VerifyConfig.cs b/test/BililiveRecorder.Core.UnitTests/VerifyConfig.cs index fe83abb..ba62680 100644 --- a/test/BililiveRecorder.Core.UnitTests/VerifyConfig.cs +++ b/test/BililiveRecorder.Core.UnitTests/VerifyConfig.cs @@ -2,6 +2,7 @@ using System.IO; using System.Runtime.CompilerServices; using DiffEngine; using VerifyTests; +using VerifyXunit; namespace BililiveRecorder.Core.UnitTests { @@ -10,7 +11,7 @@ namespace BililiveRecorder.Core.UnitTests [ModuleInitializer] public static void Init() { - VerifierSettings.DerivePathInfo(Expectations.Initialize); + Verifier.DerivePathInfo(Expectations.Initialize); VerifierSettings.IgnoreMembersWithType(); DiffRunner.Disabled = false; DiffTools.UseOrder(DiffTool.VisualStudioCode, DiffTool.Rider, DiffTool.WinMerge, DiffTool.VisualStudio); diff --git a/test/BililiveRecorder.Flv.Tests/BililiveRecorder.Flv.Tests.csproj b/test/BililiveRecorder.Flv.Tests/BililiveRecorder.Flv.Tests.csproj index d494f1d..e186ee0 100644 --- a/test/BililiveRecorder.Flv.Tests/BililiveRecorder.Flv.Tests.csproj +++ b/test/BililiveRecorder.Flv.Tests/BililiveRecorder.Flv.Tests.csproj @@ -11,9 +11,9 @@ - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/test/BililiveRecorder.Flv.Tests/Expectations/PublicApi.HasNoChangesAsync.verified.txt b/test/BililiveRecorder.Flv.Tests/Expectations/PublicApi.HasNoChangesAsync.verified.txt index eebbda1..154bb3b 100644 --- a/test/BililiveRecorder.Flv.Tests/Expectations/PublicApi.HasNoChangesAsync.verified.txt +++ b/test/BililiveRecorder.Flv.Tests/Expectations/PublicApi.HasNoChangesAsync.verified.txt @@ -1,5 +1,4 @@ -[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName="")] -namespace BililiveRecorder.DependencyInjection +namespace BililiveRecorder.DependencyInjection { public static class DependencyInjectionExtensions { diff --git a/test/BililiveRecorder.Flv.Tests/FlvTests/ParserTest.cs b/test/BililiveRecorder.Flv.Tests/FlvTests/ParserTest.cs index 0fdc034..dbddcfc 100644 --- a/test/BililiveRecorder.Flv.Tests/FlvTests/ParserTest.cs +++ b/test/BililiveRecorder.Flv.Tests/FlvTests/ParserTest.cs @@ -29,7 +29,7 @@ namespace BililiveRecorder.Flv.Tests.FlvTests tags.Add(tag); } - await Verifier.Verify(tags.SerializeXml()).UseExtension("xml").UseParameters(path); + await Verifier.Verify(tags.SerializeXml(), extension: "xml").UseParameters(path); } } } diff --git a/test/BililiveRecorder.Flv.Tests/FlvTests/WriterTests.cs b/test/BililiveRecorder.Flv.Tests/FlvTests/WriterTests.cs index a974d70..55d0fc3 100644 --- a/test/BililiveRecorder.Flv.Tests/FlvTests/WriterTests.cs +++ b/test/BililiveRecorder.Flv.Tests/FlvTests/WriterTests.cs @@ -34,7 +34,7 @@ namespace BililiveRecorder.Flv.Tests.FlvTests await writer.WriteTag(tag); } - await Verifier.Verify(msprovider.Stream).UseExtension("flv").UseParameters(path); + await Verifier.Verify(msprovider.Stream, extension: "flv").UseParameters(path); } public class MemoryStreamFlvTargetProvider : IFlvWriterTargetProvider @@ -47,10 +47,7 @@ namespace BililiveRecorder.Flv.Tests.FlvTests public (Stream stream, object? state) CreateOutputStream() { - if (!this.flag) - this.flag = true; - else - throw new System.InvalidOperationException(); + this.flag = !this.flag ? true : throw new System.InvalidOperationException(); return (this.Stream, null); } diff --git a/test/BililiveRecorder.Flv.Tests/PublicApi.cs b/test/BililiveRecorder.Flv.Tests/PublicApi.cs index 5f69a73..1a76778 100644 --- a/test/BililiveRecorder.Flv.Tests/PublicApi.cs +++ b/test/BililiveRecorder.Flv.Tests/PublicApi.cs @@ -11,7 +11,7 @@ namespace BililiveRecorder.Flv.Tests [Fact] public Task HasNoChangesAsync() { - var publicApi = typeof(Tag).Assembly.GeneratePublicApi(); + var publicApi = typeof(Tag).Assembly.GeneratePublicApi(new ApiGeneratorOptions { ExcludeAttributes = new[] { "System.Runtime.Versioning.TargetFrameworkAttribute" } }); return Verifier.Verify(publicApi); } } diff --git a/test/BililiveRecorder.Flv.Tests/RuleTests/FfmpegDetectionRuleTests.cs b/test/BililiveRecorder.Flv.Tests/RuleTests/FfmpegDetectionRuleTests.cs index 1603e0c..09de229 100644 --- a/test/BililiveRecorder.Flv.Tests/RuleTests/FfmpegDetectionRuleTests.cs +++ b/test/BililiveRecorder.Flv.Tests/RuleTests/FfmpegDetectionRuleTests.cs @@ -24,7 +24,7 @@ namespace BililiveRecorder.Flv.Tests.RuleTests Assert.Equal(expectEndTag, rule.EndTagDetected); } - private static IEnumerable EndTagTestData() + public static IEnumerable EndTagTestData() { yield return new object[] { true, new PipelineEndAction(new Tag()) }; yield return new object[] { false, new PipelineScriptAction(new Tag()) }; diff --git a/test/BililiveRecorder.Flv.Tests/RuleTests/IntegratedGoodTests.cs b/test/BililiveRecorder.Flv.Tests/RuleTests/IntegratedGoodTests.cs index c6ecb66..25544f0 100644 --- a/test/BililiveRecorder.Flv.Tests/RuleTests/IntegratedGoodTests.cs +++ b/test/BililiveRecorder.Flv.Tests/RuleTests/IntegratedGoodTests.cs @@ -46,7 +46,7 @@ namespace BililiveRecorder.Flv.Tests.RuleTests await AssertTagsByRerunPipeline(outputTags).ConfigureAwait(false); var xmlStr = outputTags.SerializeXml(); - await Verifier.Verify(xmlStr).UseExtension("xml").UseParameters(path); + await Verifier.Verify(xmlStr, extension: "xml").UseParameters(path); } [Theory()] @@ -90,7 +90,7 @@ namespace BililiveRecorder.Flv.Tests.RuleTests await AssertTagsByRerunPipeline(outputTags).ConfigureAwait(false); var xmlStr = outputTags.SerializeXml(); - await Verifier.Verify(xmlStr).UseExtension("xml").UseParameters(path); + await Verifier.Verify(xmlStr, extension: "xml").UseParameters(path); } } } diff --git a/test/BililiveRecorder.Flv.Tests/VerifyConfig.cs b/test/BililiveRecorder.Flv.Tests/VerifyConfig.cs index eb13265..9786533 100644 --- a/test/BililiveRecorder.Flv.Tests/VerifyConfig.cs +++ b/test/BililiveRecorder.Flv.Tests/VerifyConfig.cs @@ -4,6 +4,7 @@ using System.Reflection; using System.Runtime.CompilerServices; using DiffEngine; using VerifyTests; +using VerifyXunit; namespace BililiveRecorder.Flv.Tests { @@ -12,7 +13,7 @@ namespace BililiveRecorder.Flv.Tests [ModuleInitializer] public static void Init() { - VerifierSettings.DerivePathInfo((string sourceFile, string projectDirectory, Type type, MethodInfo method) => + Verifier.DerivePathInfo((string sourceFile, string projectDirectory, Type type, MethodInfo method) => { if (type != typeof(PublicApi) && type != typeof(TestData)) projectDirectory = Path.Combine(projectDirectory, "..", "data", "flv"); diff --git a/test/data b/test/data index 1f8f6ad..28aa6c6 160000 --- a/test/data +++ b/test/data @@ -1 +1 @@ -Subproject commit 1f8f6ad831115320d01d8954221532207e355707 +Subproject commit 28aa6c68ae6abf3242e42db703ef1676ecbb22fd