diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 83b274cc..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,18 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "nuget" - directory: "/" - schedule: - interval: "daily" - commit-message: - prefix: "(maint)" - target-branch: "develop" - ignore: - - dependency-name: "Cake.Core" - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "daily" - commit-message: - prefix: "(maint)" - target-branch: "develop" \ No newline at end of file diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 00000000..392c3ce5 --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ "github>nils-a/renovate-config" ], + "packageRules": [ + { + "matchPackageNames": ["cake.tool", "Cake.Core"], + "enabled": false + } + ] +} \ No newline at end of file diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 87170dba..ac6a84df 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -13,6 +13,7 @@ on: branches: [develop] schedule: - cron: '0 15 * * 6' + workflow_dispatch: jobs: analyze: @@ -57,6 +58,18 @@ jobs: target: DotNetCore-Build cake-version: 0.38.5 cake-bootstrap: true + env: + COMPlus_DbgEnableMiniDump: 1 + COMPlus_DbgMiniDumpType: 1 + COMPlus_DbgMiniDumpName: BuildArtifacts/coredump.dmp - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v1 + + - name: Upload CoreDump + uses: actions/upload-artifact@v2 + if: failure() + with: + if-no-files-found: warn + name: CoreDump + path: BuildArtifacts/coredump.dmp \ No newline at end of file diff --git a/.github/workflows/dependabot-cake.yml b/.github/workflows/dependabot-cake.yml deleted file mode 100644 index f34a9670..00000000 --- a/.github/workflows/dependabot-cake.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Run dependabot for cake -on: - workflow_dispatch: - schedule: - # run everyday at 6 - - cron: '0 6 * * *' - -jobs: - dependabot-cake: - runs-on: ubuntu-latest # linux, because this is a docker-action - steps: - - name: check/update cake dependencies - uses: nils-org/dependabot-cake-action@v1 \ No newline at end of file diff --git a/demo/frosting/build/Build.csproj b/demo/frosting/build/Build.csproj index b626894d..99cf44ad 100644 --- a/demo/frosting/build/Build.csproj +++ b/demo/frosting/build/Build.csproj @@ -5,7 +5,7 @@ $(MSBuildProjectDirectory).. - + diff --git a/src/.idea/.idea.Cake.7zip/.idea/indexLayout.xml b/src/.idea/.idea.Cake.7zip/.idea/indexLayout.xml index 27ba142e..7b08163c 100644 --- a/src/.idea/.idea.Cake.7zip/.idea/indexLayout.xml +++ b/src/.idea/.idea.Cake.7zip/.idea/indexLayout.xml @@ -1,6 +1,6 @@ - + diff --git a/src/.idea/.idea.Cake.7zip/.idea/riderModule.iml b/src/.idea/.idea.Cake.7zip/.idea/riderModule.iml deleted file mode 100644 index dc88bc17..00000000 --- a/src/.idea/.idea.Cake.7zip/.idea/riderModule.iml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Cake.7zip.Tests/Cake.7zip.Tests.csproj b/src/Cake.7zip.Tests/Cake.7zip.Tests.csproj index a771c64b..f6a36e95 100644 --- a/src/Cake.7zip.Tests/Cake.7zip.Tests.csproj +++ b/src/Cake.7zip.Tests/Cake.7zip.Tests.csproj @@ -11,23 +11,22 @@ - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + @@ -39,4 +38,4 @@ - \ No newline at end of file + diff --git a/src/Cake.7zip.Tests/Commands/AbstractOutputCommandTests.cs b/src/Cake.7zip.Tests/Commands/AbstractOutputCommandTests.cs index 58290b6f..0ec899fb 100644 --- a/src/Cake.7zip.Tests/Commands/AbstractOutputCommandTests.cs +++ b/src/Cake.7zip.Tests/Commands/AbstractOutputCommandTests.cs @@ -1,10 +1,10 @@ using Cake.SevenZip.Commands; using Cake.SevenZip.Parsers; -using FluentAssertions; - using Moq; +using Shouldly; + using Xunit; namespace Cake.SevenZip.Tests.Commands @@ -24,7 +24,7 @@ public void AbstractOutputCommand_sets_raw_output() ((ICanParseOutput)partialMock).SetRawOutput(expected); - actual.Should().BeEquivalentTo(expected); + actual.ShouldBeEquivalentTo(expected); } [Fact] @@ -39,7 +39,7 @@ public void AbstractOutputCommand_sets_nothing_when_called_with_null() ((ICanParseOutput)partialMock).SetRawOutput(null); - actual.Should().BeNull(); + actual.ShouldBeNull(); } [Fact] @@ -56,7 +56,7 @@ public void AbstractOutputCommand_uses_parser_to_set_non_raw_output() ((ICanParseOutput)partialMock).SetRawOutput(new string[] { }); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } } } diff --git a/src/Cake.7zip.Tests/Commands/BenchmarkCommandTests.cs b/src/Cake.7zip.Tests/Commands/BenchmarkCommandTests.cs index d44dd620..cd3e098d 100644 --- a/src/Cake.7zip.Tests/Commands/BenchmarkCommandTests.cs +++ b/src/Cake.7zip.Tests/Commands/BenchmarkCommandTests.cs @@ -5,7 +5,7 @@ using Cake.SevenZip.Commands; using Cake.SevenZip.Parsers; -using FluentAssertions; +using Shouldly; using Xunit; @@ -19,8 +19,8 @@ public void OutputCommand_uses_its_own_parser(BaseOutputCommand command, T where T : IOutput { var actual = command.OutputParser; - actual.Should().NotBeNull(); - actual.Should().BeOfType(expectedParserType); + actual.ShouldNotBeNull(); + actual.ShouldBeOfType(expectedParserType); } private class TestData : IEnumerable diff --git a/src/Cake.7zip.Tests/Commands/CommandExtensionTests.cs b/src/Cake.7zip.Tests/Commands/CommandExtensionTests.cs index 0169ae8a..a86b673b 100644 --- a/src/Cake.7zip.Tests/Commands/CommandExtensionTests.cs +++ b/src/Cake.7zip.Tests/Commands/CommandExtensionTests.cs @@ -2,7 +2,7 @@ using Cake.SevenZip.Commands; -using FluentAssertions; +using Shouldly; using Xunit; @@ -25,7 +25,7 @@ public void Extension_RequireNotNull_throws_for_null() // ReSharper disable once ExpressionIsAlwaysNull Action action = () => o.RequireNotNull("boom"); - action.Should().Throw().WithMessage("boom"); + action.ShouldThrow().Message.ShouldBe("boom"); } [Fact] @@ -52,11 +52,11 @@ public void Extension_RequireNotEmpty_throws_for_empty_enumerables() { Action action = () => (new object[] { }).RequireNotEmpty("boom"); - action.Should().Throw().WithMessage("boom"); + action.ShouldThrow().Message.ShouldBe("boom"); } [Fact] - public void Extension_RequireNotEmpty_does_not_throw_for_enumerble_alternatives() + public void Extension_RequireNotEmpty_does_not_throw_for_enumerable_alternatives() { // ReSharper disable once CoVariantArrayConversion (new object[] { }).RequireNotEmpty("boom", new[] { new[] { "" } }); // two arrays, because of the "params-array" diff --git a/src/Cake.7zip.Tests/Commands/GeneralOutputCommandTests.cs b/src/Cake.7zip.Tests/Commands/GeneralOutputCommandTests.cs index 9381d8a9..654cbd80 100644 --- a/src/Cake.7zip.Tests/Commands/GeneralOutputCommandTests.cs +++ b/src/Cake.7zip.Tests/Commands/GeneralOutputCommandTests.cs @@ -5,7 +5,7 @@ using Cake.SevenZip.Commands; using Cake.SevenZip.Parsers; -using FluentAssertions; +using Shouldly; using Xunit; @@ -19,8 +19,8 @@ public void OutputCommand_uses_its_own_parser(BaseOutputCommand command, T where T : IOutput { var actual = command.OutputParser; - actual.Should().NotBeNull(); - actual.Should().BeOfType(expectedParserType); + actual.ShouldNotBeNull(); + actual.ShouldBeOfType(expectedParserType); } private class TestData : IEnumerable diff --git a/src/Cake.7zip.Tests/FluentBuilder/AddCommandBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/AddCommandBuilderTests.cs index ed5f2377..00da2a4d 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/AddCommandBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/AddCommandBuilderTests.cs @@ -5,7 +5,7 @@ using Cake.SevenZip.Switches; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -26,7 +26,7 @@ public void Add_can_use_Archive_and_file() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -42,7 +42,7 @@ public void Add_can_use_Archive_and_directory() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -58,7 +58,7 @@ public void Add_throws_on_missing_archive() fixture.EvaluateArgs(); }; - result.Should().Throw(); + result.ShouldThrow(); } [Fact] @@ -74,7 +74,7 @@ public void Add_throws_on_missing_fileOrDirectory() fixture.EvaluateArgs(); }; - result.Should().Throw(); + result.ShouldThrow(); } [Fact] @@ -90,7 +90,7 @@ public void Add_can_use_Archive_and_file_using_collection() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -106,7 +106,7 @@ public void Add_can_use_Archive_and_directory_using_collection() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -122,7 +122,7 @@ public void Add_can_use_Archive_and_directoryContent() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -138,7 +138,7 @@ public void Add_can_use_Archive_and_directoryContent_using_collection() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -155,7 +155,7 @@ public void Add_can_use_ArchiveType() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -176,7 +176,7 @@ public void Add_can_use_CompressionMethod() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -194,7 +194,7 @@ public void Add_can_use_CompressionMethod_multiple_times() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -211,7 +211,7 @@ public void Add_can_use_Sns() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -228,7 +228,7 @@ public void Add_can_use_Snsi() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -245,7 +245,7 @@ public void Add_can_use_Password() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -262,7 +262,7 @@ public void Add_can_use_Volume() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -280,7 +280,7 @@ public void Add_can_use_multiple_Volumes() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -297,7 +297,7 @@ public void Add_can_use_Ssw() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -314,7 +314,7 @@ public void Add_can_use_Stl() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -331,7 +331,7 @@ public void Add_can_use_WorkingDirectory() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -348,7 +348,7 @@ public void Add_can_use_Recurse() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -365,7 +365,7 @@ public void Add_can_use_IncludeFiles() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -382,7 +382,7 @@ public void Add_can_use_IncludeFiles_with_recusion() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -400,7 +400,7 @@ public void Add_can_use_IncludeFiles_multiple_times() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -417,7 +417,7 @@ public void Add_can_use_ExcludeFiles() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -434,7 +434,7 @@ public void Add_can_use_ExcludeFiles_with_recusion() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -452,7 +452,7 @@ public void Add_can_use_ExcludeFiles_multiple_times() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -470,7 +470,7 @@ public void Add_can_use_UpdateOptions() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -487,7 +487,7 @@ public void Add_can_use_DeleteAfterCompression() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -504,7 +504,7 @@ public void Add_can_use_Sfx_without_module() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -521,7 +521,7 @@ public void Add_can_use_Sfx_with_module() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -538,7 +538,7 @@ public void Add_can_use_FullQualifiedPaths_with_driveletter() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -555,7 +555,7 @@ public void Add_can_use_FullQualifiedPaths_without_driveletter() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/ArgumentArchiveBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/ArgumentArchiveBuilderTests.cs index f2d5c7a8..2b408846 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/ArgumentArchiveBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/ArgumentArchiveBuilderTests.cs @@ -2,7 +2,7 @@ using Cake.SevenZip.Arguments; using Cake.SevenZip.Builder; -using FluentAssertions; +using Shouldly; using Moq; @@ -20,7 +20,7 @@ public void WithArchive_returns_the_builder() var actual = expected.Object.WithArchive(new FilePath("foo")); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } [Fact] diff --git a/src/Cake.7zip.Tests/FluentBuilder/ArgumentDirectoriesBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/ArgumentDirectoriesBuilderTests.cs index 26745e86..8068e90e 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/ArgumentDirectoriesBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/ArgumentDirectoriesBuilderTests.cs @@ -4,7 +4,7 @@ using Cake.SevenZip.Arguments; using Cake.SevenZip.Builder; -using FluentAssertions; +using Shouldly; using Moq; @@ -24,7 +24,7 @@ public void WithDirectories_returns_the_builder() var actual = expected.Object.WithDirectories(new DirectoryPath("foo")); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } [Fact] @@ -37,7 +37,7 @@ public void WithDirectories_collection_returns_the_builder() var actual = expected.Object.WithDirectories(new DirectoryPathCollection()); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } [Fact] @@ -50,7 +50,7 @@ public void WithDirectoryContents_returns_the_builder() var actual = expected.Object.WithDirectoryContents(new DirectoryPath("foo")); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } [Fact] @@ -63,7 +63,7 @@ public void WithDirectoryContents_collection_returns_the_builder() var actual = expected.Object.WithDirectoryContents(new DirectoryPathCollection()); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } [Fact] @@ -76,7 +76,7 @@ public void WithDirectoryContents_sets_the_directoryContents() var expected = new DirectoryPath("foo"); builder.Object.WithDirectoryContents(expected); - command.Object.DirectoryContents.Single().Should().Be(expected); + command.Object.DirectoryContents.Single().ShouldBe(expected); } [Fact] @@ -90,7 +90,7 @@ public void WithDirectoryContents_collection_sets_the_directoryContents() builder.Object.WithDirectoryContents(new DirectoryPathCollection(new[] { expected })); - command.Object.DirectoryContents.Single().Should().Be(expected); + command.Object.DirectoryContents.Single().ShouldBe(expected); } [Fact] @@ -104,7 +104,7 @@ public void WithDirectories_sets_the_directoryContents() builder.Object.WithDirectories(expected); - command.Object.Directories.Single().Should().Be(expected); + command.Object.Directories.Single().ShouldBe(expected); } [Fact] @@ -118,7 +118,7 @@ public void WithDirectories_collection_sets_the_directoryContents() builder.Object.WithDirectories(new DirectoryPathCollection(new[] { expected })); - command.Object.Directories.Single().Should().Be(expected); + command.Object.Directories.Single().ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/ArgumentFilesBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/ArgumentFilesBuilderTests.cs index 511c5148..1536c0ff 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/ArgumentFilesBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/ArgumentFilesBuilderTests.cs @@ -4,7 +4,7 @@ using Cake.SevenZip.Arguments; using Cake.SevenZip.Builder; -using FluentAssertions; +using Shouldly; using Moq; @@ -24,7 +24,7 @@ public void WithFiles_returns_the_builder() var actual = expected.Object.WithFiles(new FilePath("foo")); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } [Fact] @@ -37,7 +37,7 @@ public void WithFiles_collection_returns_the_builder() var actual = expected.Object.WithFiles(new FilePathCollection()); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } [Fact] @@ -51,7 +51,7 @@ public void WithFiles_sets_the_directoryContents() builder.Object.WithFiles(expected); - command.Object.Files.Single().Should().Be(expected); + command.Object.Files.Single().ShouldBe(expected); } [Fact] @@ -65,7 +65,7 @@ public void WithFiles_collection_sets_the_directoryContents() builder.Object.WithFiles(new FilePathCollection(new[] { expected })); - command.Object.Files.Single().Should().Be(expected); + command.Object.Files.Single().ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/BaseOutputBuilderTest.cs b/src/Cake.7zip.Tests/FluentBuilder/BaseOutputBuilderTest.cs index 98597d7b..6156e622 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/BaseOutputBuilderTest.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/BaseOutputBuilderTest.cs @@ -6,7 +6,7 @@ using Cake.SevenZip.Commands; using Cake.SevenZip.Parsers; -using FluentAssertions; +using Shouldly; using Moq; @@ -25,7 +25,7 @@ public void WithCommandOutput_returns_the_builder() var actual = expected.WithCommandOutput(null); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -37,7 +37,7 @@ public void WithCommandRawOutput_returns_the_builder() var actual = expected.WithCommandRawOutput(null); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -51,7 +51,7 @@ public void WithCommandOutput_sets_the_outputAction_on_the_command() builder.WithCommandOutput(expected); - command.Object.OutputAction.Should().Be(expected); + command.Object.OutputAction.ShouldBe(expected); } [Fact] @@ -65,7 +65,7 @@ public void WithCommandRawOutput_sets_the_rawOutputAction_on_the_command() builder.WithCommandRawOutput(expected); - command.Object.RawOutputAction.Should().Be(expected); + command.Object.RawOutputAction.ShouldBe(expected); } [Fact] @@ -106,7 +106,7 @@ public void All_outputBuilders_are_implementing_the_interface() var commandPropertyGetter = commandProperty.GetMethod; var actual = commandPropertyGetter.Invoke(builder, new object[0]); - actual.Should().Be(expected); + actual.ShouldBe(expected); } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/BenchmarkCommandBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/BenchmarkCommandBuilderTests.cs index 40c56334..0f14d11f 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/BenchmarkCommandBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/BenchmarkCommandBuilderTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Tests.Fixtures; using Xunit; -using FluentAssertions; +using Shouldly; using System.Collections.Generic; using System.Collections; using System; @@ -24,7 +24,7 @@ public void Benchmark_can_be_used_alone() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -39,7 +39,7 @@ public void Benchmark_can_use_method() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -54,7 +54,7 @@ public void Benchmark_can_use_numberOfIterations() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -69,7 +69,7 @@ public void Benchmark_can_use_numberOfThreads() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -84,7 +84,7 @@ public void Benchmark_can_use_dictionarySize() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -102,7 +102,7 @@ public void Benchmark_can_use_OptionsInCombination() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -120,7 +120,7 @@ public void Benchmark_can_use_OptionsInCombination_regardlessOfOrder() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -137,7 +137,7 @@ public void Benchmark_parses_and_sets_the_output() info = o.Information; })); - info.Should().NotBeNull(); + info.ShouldNotBeNull(); } [Theory] @@ -154,7 +154,7 @@ public void BenchmarkCommandBuilder_sets_property_on_command( var actual = getter(command); - actual.Should().Be(expected); + actual.ShouldBe(expected); } private class TestData : IEnumerable diff --git a/src/Cake.7zip.Tests/FluentBuilder/CommandBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/CommandBuilderTests.cs index 0bbc3a4c..90f656c9 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/CommandBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/CommandBuilderTests.cs @@ -9,8 +9,7 @@ using Cake.SevenZip.Commands; using Cake.SevenZip.Switches; -using FluentAssertions; -using FluentAssertions.Common; +using Shouldly; using Xunit; @@ -26,7 +25,7 @@ public void All_commands_have_a_builder(Type command) var builderTypeName = command.Name + "Builder"; var builderType = assembly.GetTypes().FirstOrDefault(t => t.Name == builderTypeName); - builderType.Should().NotBeNull($"the command {command.Name} needs a builder named {builderTypeName}"); + builderType.ShouldNotBeNull($"the command {command.Name} needs a builder named {builderTypeName}"); // commandBuilder supports the command as a mode. var commandBuilderType = typeof(CommandBuilder); @@ -35,9 +34,9 @@ public void All_commands_have_a_builder(Type command) var modeMethod = commandBuilderType .GetMethods(BindingFlags.Public | BindingFlags.Instance) .FirstOrDefault(m => m.Name == modeName); - modeMethod.Should().NotBeNull($"the CommandBuilder should have a method named {modeName} for the {command.Name}"); + modeMethod.ShouldNotBeNull($"the CommandBuilder should have a method named {modeName} for the {command.Name}"); // ReSharper disable PossibleNullReferenceException - modeMethod.ReturnType.Should().Be(builderType, $"the {modeName} of CommandBuilder should"); + modeMethod.ReturnType.ShouldBe(builderType, $"the {modeName} of CommandBuilder should"); // ReSharper enable PossibleNullReferenceException } @@ -52,7 +51,7 @@ public void All_command_switches_should_be_supported_by_the_builder(Type command var switchBuilder = genericSwitchBuilder.MakeGenericType(@switch); - builderType.Should().Implement(switchBuilder, because: $"the command {command.Name} implements {@switch.Name}, so {builderTypeName} should implement {switchBuilder}"); + switchBuilder.IsAssignableFrom(builderType).ShouldBe(true, $"the command {command.Name} implements {@switch.Name}, so {builderTypeName} should implement {switchBuilder}"); // test the interface was really implemented... var expected = Activator.CreateInstance(command); @@ -61,9 +60,9 @@ public void All_command_switches_should_be_supported_by_the_builder(Type command null, new[] { command.MakeByRefType() }, null).Invoke(new[] { expected }); - var property = switchBuilder.Properties().Single(); - var actual = property.GetGetMethod().Invoke(builder, new object[0]); - actual.Should().Be(expected); + var property = switchBuilder.GetProperties().Single(); + var actual = property.GetGetMethod().Invoke(builder, Array.Empty()); + actual.ShouldBe(expected); } [Theory] @@ -77,7 +76,7 @@ public void All_command_arguments_should_be_supported_by_the_builder(Type comman var argumentBuilder = genericArgumentBuilder.MakeGenericType(arg); - builderType.Should().Implement(argumentBuilder, because: $"the command {command.Name} implements {arg.Name}, so {builderTypeName} should implement {argumentBuilder}"); + argumentBuilder.IsAssignableFrom(builderType).ShouldBe(true, $"the command {command.Name} implements {arg.Name}, so {builderTypeName} should implement {argumentBuilder}"); // test the interface was really implemented... var expected = Activator.CreateInstance(command); @@ -86,9 +85,9 @@ public void All_command_arguments_should_be_supported_by_the_builder(Type comman null, new[] { command.MakeByRefType() }, null).Invoke(new[] { expected }); - var property = argumentBuilder.Properties().Single(); - var actual = property.GetGetMethod().Invoke(builder, new object[0]); - actual.Should().Be(expected); + var property = argumentBuilder.GetProperties().Single(); + var actual = property.GetGetMethod().Invoke(builder, Array.Empty()); + actual.ShouldBe(expected); } private static Assembly GetAssembly() @@ -103,7 +102,7 @@ public IEnumerator GetEnumerator() var commands = new CommandData().Select(x => (Type)x[0]); foreach (var c in commands) { - var supportedArguments = c.GetInterfaces().Where(i => i.Implements(typeof(IHaveArgument))); + var supportedArguments = c.GetInterfaces().Where(i => typeof(IHaveArgument).IsAssignableFrom(i)); foreach (var arg in supportedArguments) { yield return new object[] { c, arg }; @@ -124,7 +123,7 @@ public IEnumerator GetEnumerator() var commands = new CommandData().Select(x => (Type)x[0]); foreach (var c in commands) { - var supportedSwitches = c.GetInterfaces().Where(i => i.Implements(typeof(ISupportSwitch))); + var supportedSwitches = c.GetInterfaces().Where(i => typeof(ISupportSwitch).IsAssignableFrom(i)); foreach (var @switch in supportedSwitches) { yield return new object[] { c, @switch }; @@ -144,7 +143,7 @@ public IEnumerator GetEnumerator() { var assembly = GetAssembly(); var commands = assembly.GetTypes() - .Where(t => t.Implements(typeof(ICommand))) + .Where(t => typeof(ICommand).IsAssignableFrom(t)) .Where(t => !t.IsAbstract); return commands.Select(c => new object[] { c }).GetEnumerator(); diff --git a/src/Cake.7zip.Tests/FluentBuilder/DeleteCommandBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/DeleteCommandBuilderTests.cs index 9a482665..21504a43 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/DeleteCommandBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/DeleteCommandBuilderTests.cs @@ -5,7 +5,7 @@ using Cake.SevenZip.Switches; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -26,7 +26,7 @@ public void Delete_can_use_Archive_and_files() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -42,7 +42,7 @@ public void Delete_can_use_Archive_and_directories() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -57,7 +57,7 @@ public void Delete_throws_on_missing_archive() fixture.EvaluateArgs(); }; - result.Should().Throw(); + result.ShouldThrow(); } [Fact] @@ -72,7 +72,7 @@ public void Delete_can_use_archive_without_files_or_directories() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -93,7 +93,7 @@ public void Delete_can_use_CompressionMethod() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -110,7 +110,7 @@ public void Delete_can_use_CompressionMethod_multiple_times() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -126,7 +126,7 @@ public void Delete_can_use_Sns() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -142,7 +142,7 @@ public void Delete_can_use_Password() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -158,7 +158,7 @@ public void Delete_can_use_WorkingDirectory() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -174,7 +174,7 @@ public void Delete_can_use_Recurse() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -190,7 +190,7 @@ public void Delete_can_use_IncludeFiles() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -206,7 +206,7 @@ public void Delete_can_use_IncludeFiles_with_recusion() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -223,7 +223,7 @@ public void Delete_can_use_IncludeFiles_multiple_times() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -239,7 +239,7 @@ public void Delete_can_use_ExcludeFiles() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -255,7 +255,7 @@ public void Delete_can_use_ExcludeFiles_with_recusion() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -272,7 +272,7 @@ public void Delete_can_use_ExcludeFiles_multiple_times() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -289,7 +289,7 @@ public void Delete_can_use_UpdateOptions() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -305,7 +305,7 @@ public void Delete_can_use_Sfx_without_module() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -321,7 +321,7 @@ public void Delete_can_use_Sfx_with_module() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -337,7 +337,7 @@ public void Delete_can_use_FullQualifiedPaths_with_driveletter() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -353,7 +353,7 @@ public void Delete_can_use_FullQualifiedPaths_without_driveletter() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/ExtractCommandBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/ExtractCommandBuilderTests.cs index 3d4ddd0a..cf74a33b 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/ExtractCommandBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/ExtractCommandBuilderTests.cs @@ -6,7 +6,7 @@ using Xunit; using System; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; namespace Cake.SevenZip.Tests.FluentBuilder { @@ -20,7 +20,7 @@ public void WithFullPathExtraction_returns_the_builder() var actual = sut.WithFullPathExtraction(); - actual.Should().Be(sut); + actual.ShouldBe(sut); } [Fact] @@ -31,7 +31,7 @@ public void WithoutFullPathExtraction_returns_the_builder() var actual = sut.WithoutFullPathExtraction(); - actual.Should().Be(sut); + actual.ShouldBe(sut); } [Fact] @@ -42,7 +42,7 @@ public void WithFullPathExtraction_sets_UseFullPaths_to_true_on_the_command() sut.WithFullPathExtraction(); - command.UseFullPaths.Should().BeTrue(); + command.UseFullPaths.ShouldBeTrue(); } [Fact] @@ -53,7 +53,7 @@ public void WithoutFullPathExtraction_sets_UseFullPaths_to_false_on_the_command( sut.WithoutFullPathExtraction(); - command.UseFullPaths.Should().BeFalse(); + command.UseFullPaths.ShouldBeFalse(); } [Fact] @@ -68,7 +68,7 @@ public void Extract_can_use_Archive() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -84,7 +84,7 @@ public void Extract_can_use_full_path_mode() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -100,7 +100,7 @@ public void Extract_can_use_single_output_directory() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -115,7 +115,7 @@ public void Extract_throws_on_missing_archive() fixture.EvaluateArgs(); }; - result.Should().Throw(); + result.ShouldThrow(); } [Fact] @@ -131,7 +131,7 @@ public void Extract_can_use_ArchiveType() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -151,7 +151,7 @@ public void Extract_can_use_CompressionMethod() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -167,7 +167,7 @@ public void Extract_can_use_Sns() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -183,7 +183,7 @@ public void Extract_can_use_Snsi() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -199,7 +199,7 @@ public void Extract_can_use_Password() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -215,7 +215,7 @@ public void Extract_can_use_Recurse() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -231,7 +231,7 @@ public void Extract_can_use_IncludeFiles() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -247,7 +247,7 @@ public void Extract_can_use_ExcludeFiles() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -263,7 +263,7 @@ public void Extract_can_use_IncludeArchiveFiles() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -279,7 +279,7 @@ public void Extract_can_use_IncludeArchiveFiles_with_recusion() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -296,7 +296,7 @@ public void Extract_can_use_IncludeArchiveFiles_multiple_times() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -312,7 +312,7 @@ public void Extract_can_use_ExcludeArchiveFiles() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -328,7 +328,7 @@ public void Extract_can_use_ExcludeArchiveFiles_with_recusion() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -345,7 +345,7 @@ public void Extract_can_use_ExcludeArchiveFiles_multiple_times() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -361,7 +361,7 @@ public void Extract_can_use_DisableParsingOfArchiveName() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -377,7 +377,7 @@ public void Extract_can_use_OverwireMode() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -393,7 +393,7 @@ public void Extract_can_use_OutputDirectory() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -409,7 +409,7 @@ public void Extract_can_use_FullQualifiedPaths_with_driveletter() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -425,7 +425,7 @@ public void Extract_can_use_FullQualifiedPaths_without_driveletter() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/GeneralCommandBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/GeneralCommandBuilderTests.cs index 24f30d6f..b981edce 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/GeneralCommandBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/GeneralCommandBuilderTests.cs @@ -4,7 +4,7 @@ using Cake.SevenZip.Commands; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; using System; using System.Linq; @@ -37,7 +37,7 @@ public void Builders_support_needed_switches(Type commandType, Type builderType) { var expectedInterface = supportBuilder.MakeGenericType(supportSwitch); - builerInterfaces.Should().Contain(expectedInterface); + builerInterfaces.ShouldContain(expectedInterface); } } @@ -62,7 +62,7 @@ public void Builders_support_needed_arguments(Type commandType, Type builderType { var expectedInterface = supportBuilder.MakeGenericType(hasArgument); - builerInterfaces.Should().Contain(expectedInterface); + builerInterfaces.ShouldContain(expectedInterface); } } @@ -85,7 +85,7 @@ public void Every_switch_has_a_supportsSwitch() foreach (var @switch in allSwitches) { - allSwitchesUsedInSupportSwitches.Should().Contain(@switch); + allSwitchesUsedInSupportSwitches.ShouldContain(@switch); } } @@ -109,7 +109,7 @@ public void Every_supportsSwitch_has_a_builder() { var expectedType = supportBuilder.MakeGenericType(@switch); - allSupportBuilderExtensionMethodTypes.Should().Contain(expectedType); + allSupportBuilderExtensionMethodTypes.ShouldContain(expectedType); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/HashCommandBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/HashCommandBuilderTests.cs index ed4d5c87..1867b540 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/HashCommandBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/HashCommandBuilderTests.cs @@ -5,7 +5,7 @@ using Cake.SevenZip.Switches; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -28,7 +28,7 @@ public void Hash_parses_and_sets_the_output() info = o.Information; })); - info.Should().NotBeNull(); + info.ShouldNotBeNull(); } [Fact] @@ -46,7 +46,7 @@ public void Hash_sets_rawoutput() output = r; })); - output.Should().BeEquivalentTo(Outputs.Hash); + output.ShouldBeEquivalentTo(Outputs.Hash); } [Fact] @@ -58,7 +58,7 @@ public void Hash_without_file_or_archive_thows() Action action = () => fixture.EvaluateArgs(); - action.Should().Throw(); + action.ShouldThrow(); } [Fact] @@ -73,7 +73,7 @@ public void Hash_with_files_works() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -88,7 +88,7 @@ public void Hash_with_directory_works() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -103,7 +103,7 @@ public void Hash_with_directoryContents_works() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -119,7 +119,7 @@ public void Hash_with_hashFunction_works() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -136,7 +136,7 @@ public void Hash_with_hashFunction_works_multiple_times() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -152,7 +152,7 @@ public void Hash_with_includeFilenames_works() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -168,7 +168,7 @@ public void Hash_with_excludeFilenames_works() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -184,7 +184,7 @@ public void Hash_with_compressFilesOpenForWriting_works() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -200,7 +200,7 @@ public void Hash_with_compressionMethod_works() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -216,7 +216,7 @@ public void Hash_with_ntfsAlternateStreams_works() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -232,7 +232,7 @@ public void Hash_with_recurseSubdirectories_works() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/InformationCommandBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/InformationCommandBuilderTests.cs index 0eabe58c..b17599d5 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/InformationCommandBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/InformationCommandBuilderTests.cs @@ -1,6 +1,6 @@ using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -19,7 +19,7 @@ public void Information_can_be_used() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -36,7 +36,7 @@ public void Information_parses_and_sets_the_output() info = o.Information; })); - info.Should().NotBeNull(); + info.ShouldNotBeNull(); } [Fact] @@ -53,7 +53,7 @@ public void Information_sets_rawoutput() output = r; })); - output.Should().BeEquivalentTo(Outputs.Information); + output.ShouldBeEquivalentTo(Outputs.Information); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/ListCommandBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/ListCommandBuilderTests.cs index 7e404d17..d9f2364c 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/ListCommandBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/ListCommandBuilderTests.cs @@ -4,7 +4,7 @@ using Cake.SevenZip.Tests.Fixtures; using Cake.SevenZip.Builder; -using FluentAssertions; +using Shouldly; using Xunit; using Cake.SevenZip.Switches; @@ -25,7 +25,7 @@ public void List_throws_on_missing_archive() fixture.EvaluateArgs(); }; - result.Should().Throw(); + result.ShouldThrow(); } [Fact] @@ -40,7 +40,7 @@ public void List_can_use_Archive() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -58,7 +58,7 @@ public void List_parses_and_sets_the_output() info = o.Information; })); - info.Should().NotBeNull(); + info.ShouldNotBeNull(); } [Fact] @@ -76,7 +76,7 @@ public void List_sets_rawoutput() output = r; })); - output.Should().BeEquivalentTo(Outputs.List.MultipleArchives); + output.ShouldBeEquivalentTo(Outputs.List.MultipleArchives); } [Fact] @@ -92,7 +92,7 @@ public void List_can_use_IncludeArchiveFilenames() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -108,7 +108,7 @@ public void List_can_use_DisableParsingOfArchiveName() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -124,7 +124,7 @@ public void List_can_use_ExcludeArchiveFilenames() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -140,7 +140,7 @@ public void List_can_use_IncludeFilenames() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -156,7 +156,7 @@ public void List_can_use_NtfsAlternateStreams() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -172,7 +172,7 @@ public void List_can_use_Password() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -188,7 +188,7 @@ public void List_can_use_RecurseSubdirectories() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -204,7 +204,7 @@ public void List_can_use_ArchiveType() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -220,7 +220,7 @@ public void List_can_use_ExcludeFilenames() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -236,7 +236,7 @@ public void List_can_use_ShowTechnicalInformation() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/RenameCommandBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/RenameCommandBuilderTests.cs index fcd63d3c..b6672f36 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/RenameCommandBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/RenameCommandBuilderTests.cs @@ -5,7 +5,7 @@ using Xunit; using System; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; namespace Cake.SevenZip.Tests.FluentBuilder { @@ -24,7 +24,7 @@ public void Rename_can_use_Archive_and_filePairs() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -40,7 +40,7 @@ public void Rename_throws_on_missing_archive() fixture.EvaluateArgs(); }; - result.Should().Throw(); + result.ShouldThrow(); } [Fact] @@ -56,7 +56,7 @@ public void Rename_throws_on_missing_fileOrDirectory() fixture.EvaluateArgs(); }; - result.Should().Throw(); + result.ShouldThrow(); } [Fact] @@ -77,7 +77,7 @@ public void Rename_can_use_CompressionMethod() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -95,7 +95,7 @@ public void Rename_can_use_CompressionMethod_multiple_times() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -112,7 +112,7 @@ public void Rename_can_use_Password() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -129,7 +129,7 @@ public void Rename_can_use_Stl() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -146,7 +146,7 @@ public void Rename_can_use_WorkingDirectory() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -163,7 +163,7 @@ public void Rename_can_use_Recurse() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -180,7 +180,7 @@ public void Rename_can_use_IncludeFiles() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -197,7 +197,7 @@ public void Rename_can_use_IncludeFiles_with_recusion() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -215,7 +215,7 @@ public void Rename_can_use_IncludeFiles_multiple_times() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -232,7 +232,7 @@ public void Rename_can_use_ExcludeFiles() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -249,7 +249,7 @@ public void Rename_can_use_ExcludeFiles_with_recusion() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -267,7 +267,7 @@ public void Rename_can_use_ExcludeFiles_multiple_times() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -285,7 +285,7 @@ public void Rename_can_use_UpdateOptions() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/SwitchArchiveTypeBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/SwitchArchiveTypeBuilderTests.cs index 1928bc17..54c3c563 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/SwitchArchiveTypeBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/SwitchArchiveTypeBuilderTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Builder; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; using Moq; @@ -21,7 +21,7 @@ public void WithArchiveType_returns_the_builder() var actual = expected.Object.WithArchiveType(default); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } [Fact] @@ -35,7 +35,7 @@ public void WithArchiveType_sets_archiveType_on_command() builder.Object.WithArchiveType(expected); - command.Object.ArchiveType.Should().Be(expected); + command.Object.ArchiveType.ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/SwitchCompressFilesOpenForWritingBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/SwitchCompressFilesOpenForWritingBuilderTests.cs index 28e32da4..f9623b79 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/SwitchCompressFilesOpenForWritingBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/SwitchCompressFilesOpenForWritingBuilderTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Builder; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; using Moq; @@ -21,7 +21,7 @@ public void WithCompressFilesOpenForWriting_returns_the_builder() var actual = expected.Object.WithCompressFilesOpenForWriting(); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } [Fact] @@ -34,7 +34,7 @@ public void WithCompressFilesOpenForWriting_sets_switch_CompressFilesOpenForWrit expected.Object.WithCompressFilesOpenForWriting(); - command.Object.CompressFilesOpenForWriting.Should().NotBeNull(); + command.Object.CompressFilesOpenForWriting.ShouldNotBeNull(); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/SwitchCompressionMethodBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/SwitchCompressionMethodBuilderTests.cs index 7f9c5061..e70c432b 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/SwitchCompressionMethodBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/SwitchCompressionMethodBuilderTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Builder; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; using Moq; @@ -21,7 +21,7 @@ public void WithCompressionMethod_returns_the_builder() var actual = expected.Object.WithCompressionMethod(c => { }); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } [Fact] @@ -34,7 +34,7 @@ public void WithCompressionMethodLevel_returns_the_builder() var actual = expected.Object.WithCompressionMethodLevel(default); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } [Fact] @@ -47,7 +47,7 @@ public void WithCompressionMethodMethod_returns_the_builder() var actual = expected.Object.WithCompressionMethodMethod(default); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/SwitchDeleteAfterCompressionBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/SwitchDeleteAfterCompressionBuilderTests.cs index a48dca33..67ae7987 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/SwitchDeleteAfterCompressionBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/SwitchDeleteAfterCompressionBuilderTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Builder; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; using Moq; @@ -21,7 +21,7 @@ public void WithDeleteAfterCompression_returns_the_builder() var actual = expected.Object.WithDeleteAfterCompression(); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/SwitchDisableParsingOfArchiveNameBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/SwitchDisableParsingOfArchiveNameBuilderTests.cs index a2a99815..8b1ae690 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/SwitchDisableParsingOfArchiveNameBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/SwitchDisableParsingOfArchiveNameBuilderTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Builder; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; using Moq; @@ -21,7 +21,7 @@ public void WithDisableParsingOfArchiveName_returns_the_builder() var actual = expected.Object.WithDisableParsingOfArchiveName(); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/SwitchExcludeArchiveFilenamesBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/SwitchExcludeArchiveFilenamesBuilderTests.cs index d0311b25..8998a674 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/SwitchExcludeArchiveFilenamesBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/SwitchExcludeArchiveFilenamesBuilderTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Builder; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; using Moq; @@ -21,7 +21,7 @@ public void WithDeleteAfterCompression_returns_the_builder() var actual = expected.Object.WithExcludeArchiveFilenames(default); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } [Fact] @@ -34,7 +34,7 @@ public void WithDeleteAfterCompression__with_recurseType_returns_the_builder() var actual = expected.Object.WithExcludeArchiveFilenames((RecurseType)default, default); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/SwitchExcludeFilenamesBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/SwitchExcludeFilenamesBuilderTests.cs index 9ff969b8..734280ca 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/SwitchExcludeFilenamesBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/SwitchExcludeFilenamesBuilderTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Builder; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; using Moq; @@ -21,7 +21,7 @@ public void WithExcludeFilenames_returns_the_builder() var actual = expected.Object.WithExcludeFilenames(default); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } [Fact] @@ -34,7 +34,7 @@ public void WithExcludeFilenames_with_recursetype_returns_the_builder() var actual = expected.Object.WithExcludeFilenames((RecurseType)default, default); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/SwitchFullyQualifiedFilePathsBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/SwitchFullyQualifiedFilePathsBuilderTests.cs index 53a17897..15675ce6 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/SwitchFullyQualifiedFilePathsBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/SwitchFullyQualifiedFilePathsBuilderTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Builder; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; using Moq; @@ -21,7 +21,7 @@ public void WithFullyQualifiedFilePaths_returns_the_builder() var actual = expected.Object.WithFullyQualifiedFilePaths(default); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/SwitchIncludeArchiveFilenamesBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/SwitchIncludeArchiveFilenamesBuilderTests.cs index 75530c78..3caf367f 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/SwitchIncludeArchiveFilenamesBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/SwitchIncludeArchiveFilenamesBuilderTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Builder; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; using Moq; @@ -21,7 +21,7 @@ public void WithIncludeArchiveFilenames_returns_the_builder() var actual = expected.Object.WithIncludeArchiveFilenames(default); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } [Fact] @@ -34,7 +34,7 @@ public void WithIncludeArchiveFilenames_with_recursetype_returns_the_builder() var actual = expected.Object.WithIncludeArchiveFilenames((RecurseType)default, default); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/SwitchIncludeFilenamesBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/SwitchIncludeFilenamesBuilderTests.cs index 5f07ae5f..4b9c5752 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/SwitchIncludeFilenamesBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/SwitchIncludeFilenamesBuilderTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Builder; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; using Moq; @@ -21,7 +21,7 @@ public void WithIncludeFilenames_returns_the_builder() var actual = expected.Object.WithIncludeFilenames(default); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } [Fact] @@ -34,7 +34,7 @@ public void WithIncludeFilenames_with_recursetype_returns_the_builder() var actual = expected.Object.WithIncludeFilenames((RecurseType)default, default); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/SwitchNtSecurityInformationBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/SwitchNtSecurityInformationBuilderTests.cs index 4718d093..b884d2eb 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/SwitchNtSecurityInformationBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/SwitchNtSecurityInformationBuilderTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Builder; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; using Moq; @@ -21,7 +21,7 @@ public void WithNtSecurityInformation_returns_the_builder() var actual = expected.Object.WithNtSecurityInformation(); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/SwitchNtfsAlternateStreamsBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/SwitchNtfsAlternateStreamsBuilderTests.cs index e3e0746d..e68345b9 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/SwitchNtfsAlternateStreamsBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/SwitchNtfsAlternateStreamsBuilderTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Builder; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; using Moq; @@ -21,7 +21,7 @@ public void WithNtfsAlternateStreams_returns_the_builder() var actual = expected.Object.WithNtfsAlternateStreams(); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/SwitchOutputDirectoryBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/SwitchOutputDirectoryBuilderTests.cs index da1a52b2..c4135364 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/SwitchOutputDirectoryBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/SwitchOutputDirectoryBuilderTests.cs @@ -2,7 +2,7 @@ using Cake.SevenZip.Builder; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; using Moq; @@ -22,7 +22,7 @@ public void WithOutputDirectory_returns_the_builder() var actual = expected.Object.WithOutputDirectory(new DirectoryPath("foo")); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/SwitchOverwriteModeBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/SwitchOverwriteModeBuilderTests.cs index 428aa24e..af08d2fd 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/SwitchOverwriteModeBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/SwitchOverwriteModeBuilderTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Builder; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; using Moq; @@ -21,7 +21,7 @@ public void WithOverwriteMode_returns_the_builder() var actual = expected.Object.WithOverwriteMode(default); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/SwitchPasswordBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/SwitchPasswordBuilderTests.cs index b5df6279..32a62203 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/SwitchPasswordBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/SwitchPasswordBuilderTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Builder; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; using Moq; @@ -21,7 +21,7 @@ public void WithPassword_returns_the_builder() var actual = expected.Object.WithPassword("x"); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/SwitchRecurseSubdirectoriesBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/SwitchRecurseSubdirectoriesBuilderTests.cs index 531912b7..10366b04 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/SwitchRecurseSubdirectoriesBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/SwitchRecurseSubdirectoriesBuilderTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Builder; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; using Moq; @@ -21,7 +21,7 @@ public void WithRecurseSubdirectories_returns_the_builder() var actual = expected.Object.WithRecurseSubdirectories(default); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/SwitchSelfExtractingArchiveBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/SwitchSelfExtractingArchiveBuilderTests.cs index dc93bfcf..74b1e849 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/SwitchSelfExtractingArchiveBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/SwitchSelfExtractingArchiveBuilderTests.cs @@ -2,7 +2,7 @@ using Cake.SevenZip.Builder; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; using Moq; @@ -22,7 +22,7 @@ public void WithSelfExtractingArchive_returns_the_builder() var actual = expected.Object.WithSelfExtractingArchive(); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } [Fact] @@ -35,7 +35,7 @@ public void WithSelfExtractingArchive_and_module_returns_the_builder() var actual = expected.Object.WithSelfExtractingArchive(new FilePath("foo")); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/SwitchSetTimestampFromMostRecentFileBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/SwitchSetTimestampFromMostRecentFileBuilderTests.cs index d1b4957a..4e9c3014 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/SwitchSetTimestampFromMostRecentFileBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/SwitchSetTimestampFromMostRecentFileBuilderTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Builder; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; using Moq; @@ -21,7 +21,7 @@ public void WithSetTimestampFromMostRecentFile_returns_the_builder() var actual = expected.Object.WithSetTimestampFromMostRecentFile(); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/SwitchShowTechnicalInformationBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/SwitchShowTechnicalInformationBuilderTests.cs index 83d757a5..62026283 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/SwitchShowTechnicalInformationBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/SwitchShowTechnicalInformationBuilderTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Builder; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; using Moq; @@ -21,7 +21,7 @@ public void WithShowTechnicalInformation_returns_the_builder() var actual = expected.Object.WithShowTechnicalInformation(); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/SwitchSwitchSetHashFunctionBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/SwitchSwitchSetHashFunctionBuilderTests.cs index 3c36c747..24938469 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/SwitchSwitchSetHashFunctionBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/SwitchSwitchSetHashFunctionBuilderTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Builder; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; using Moq; @@ -21,7 +21,7 @@ public void WithSetHashFunction_returns_the_builder() var actual = expected.Object.WithHashFunction(SwitchSetHashFunction.Crc32); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/SwitchUpdateOptionsBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/SwitchUpdateOptionsBuilderTests.cs index b0eea726..03e2e3aa 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/SwitchUpdateOptionsBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/SwitchUpdateOptionsBuilderTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Builder; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; using Moq; @@ -21,7 +21,7 @@ public void WithUpdateOptions_returns_the_builder() var actual = expected.Object.WithUpdateOptions(o => { }); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/SwitchVolumeBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/SwitchVolumeBuilderTests.cs index 39634437..a449210e 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/SwitchVolumeBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/SwitchVolumeBuilderTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Builder; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; using Moq; @@ -21,7 +21,7 @@ public void WithVolume_returns_the_builder() var actual = expected.Object.WithVolume(1); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/SwitchWorkingDirectoryBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/SwitchWorkingDirectoryBuilderTests.cs index a83e3947..4631366c 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/SwitchWorkingDirectoryBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/SwitchWorkingDirectoryBuilderTests.cs @@ -2,7 +2,7 @@ using Cake.SevenZip.Builder; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; using Moq; @@ -22,7 +22,7 @@ public void WithWorkingDirectory_returns_the_builder() var actual = expected.Object.WithWorkingDirectory(new DirectoryPath("foo")); - actual.Should().Be(expected.Object); + actual.ShouldBe(expected.Object); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/TestCommandBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/TestCommandBuilderTests.cs index 21212b29..5786a316 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/TestCommandBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/TestCommandBuilderTests.cs @@ -4,7 +4,7 @@ using Xunit; using System; -using FluentAssertions; +using Shouldly; using Cake.SevenZip.Switches; namespace Cake.SevenZip.Tests.FluentBuilder @@ -20,7 +20,7 @@ public void TestCommand_without_archive_should_throw() Action action = () => fixture.EvaluateArgs(); - action.Should().Throw(); + action.ShouldThrow(); } [Fact] @@ -35,7 +35,7 @@ public void TestCommand_with_archive_should_work() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -51,7 +51,7 @@ public void TestCommand_with_archive_and_file_should_work() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -67,7 +67,7 @@ public void TestCommand_can_use_WithDisableParsingOfArchiveName() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -83,7 +83,7 @@ public void TestCommand_can_use_WithExcludeArchiveFilenames() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -100,7 +100,7 @@ public void TestCommand_can_use_ExcludeArchiveFiles_multiple_times() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -116,7 +116,7 @@ public void TestCommand_can_use_WithExcludeFilenames() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -133,7 +133,7 @@ public void TestCommand_can_use_ExcludeFiles_multiple_times() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -149,7 +149,7 @@ public void TestCommand_can_use_WithIncludeArchiveFilenames() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -166,7 +166,7 @@ public void TestCommand_can_use_IncludeArchiveFiles_multiple_times() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -182,7 +182,7 @@ public void TestCommand_can_use_WithIncludeFilenames() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -199,7 +199,7 @@ public void TestCommand_can_use_IncludeFiles_multiple_times() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -215,7 +215,7 @@ public void TestCommand_can_use_WithNtfsAlternateStreams() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -231,7 +231,7 @@ public void TestCommand_can_use_WithPassword() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -247,7 +247,7 @@ public void TestCommand_can_use_WithRecurseSubdirectories() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/FluentBuilder/UpdateCommandBuilderTests.cs b/src/Cake.7zip.Tests/FluentBuilder/UpdateCommandBuilderTests.cs index b88a25fa..37e85b20 100644 --- a/src/Cake.7zip.Tests/FluentBuilder/UpdateCommandBuilderTests.cs +++ b/src/Cake.7zip.Tests/FluentBuilder/UpdateCommandBuilderTests.cs @@ -5,7 +5,7 @@ using Xunit; using System; using Cake.SevenZip.Switches; -using FluentAssertions; +using Shouldly; namespace Cake.SevenZip.Tests.FluentBuilder { @@ -24,7 +24,7 @@ public void Update_can_use_Archive_and_file() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -40,7 +40,7 @@ public void Update_can_use_Archive_and_directory() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -56,7 +56,7 @@ public void Update_throws_on_missing_archive() fixture.EvaluateArgs(); }; - result.Should().Throw(); + result.ShouldThrow(); } [Fact] @@ -72,7 +72,7 @@ public void Update_throws_on_missing_fileOrDirectory() fixture.EvaluateArgs(); }; - result.Should().Throw(); + result.ShouldThrow(); } [Fact] @@ -88,7 +88,7 @@ public void Update_can_use_Archive_and_file_using_collection() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -104,7 +104,7 @@ public void Update_can_use_Archive_and_directory_using_collection() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -120,7 +120,7 @@ public void Update_can_use_Archive_and_directoryContent() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -136,7 +136,7 @@ public void Update_can_use_Archive_and_directoryContent_using_collection() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -153,7 +153,7 @@ public void Update_can_use_ArchiveType() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -174,7 +174,7 @@ public void Update_can_use_CompressionMethod() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -192,7 +192,7 @@ public void Update_can_use_CompressionMethod_multiple_times() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -209,7 +209,7 @@ public void Update_can_use_Sns() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -226,7 +226,7 @@ public void Update_can_use_Snsi() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -243,7 +243,7 @@ public void Update_can_use_Password() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -260,7 +260,7 @@ public void Update_can_use_Ssw() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -277,7 +277,7 @@ public void Update_can_use_Stl() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -294,7 +294,7 @@ public void Update_can_use_WorkingDirectory() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -311,7 +311,7 @@ public void Update_can_use_Recurse() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -328,7 +328,7 @@ public void Update_can_use_IncludeFiles() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -345,7 +345,7 @@ public void Update_can_use_IncludeFiles_with_recusion() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -363,7 +363,7 @@ public void Update_can_use_IncludeFiles_multiple_times() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -380,7 +380,7 @@ public void Update_can_use_ExcludeFiles() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -397,7 +397,7 @@ public void Update_can_use_ExcludeFiles_with_recusion() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -415,7 +415,7 @@ public void Update_can_use_ExcludeFiles_multiple_times() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -433,7 +433,7 @@ public void Update_can_use_UpdateOptions() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -450,7 +450,7 @@ public void Update_can_use_Sfx_without_module() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -467,7 +467,7 @@ public void Update_can_use_Sfx_with_module() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -484,7 +484,7 @@ public void Update_can_use_FullQualifiedPaths_with_driveletter() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -501,7 +501,7 @@ public void Update_can_use_FullQualifiedPaths_without_driveletter() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/Parsers/BenchmarkOutputParserTests.cs b/src/Cake.7zip.Tests/Parsers/BenchmarkOutputParserTests.cs index 40e50aa9..29b59a35 100644 --- a/src/Cake.7zip.Tests/Parsers/BenchmarkOutputParserTests.cs +++ b/src/Cake.7zip.Tests/Parsers/BenchmarkOutputParserTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Parsers; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -17,7 +17,7 @@ public void BenchmarkParser_parses_InfoLine() var actual = parser.Parse(Outputs.Benchmark); const string expected = "7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21"; - actual.Information.Should().Be(expected); + actual.Information.ShouldBe(expected); } [Fact] @@ -27,8 +27,8 @@ public void BenchmarkParser_parses_TheBenchmark() var actual = parser.Parse(Outputs.Benchmark).Benchmark; - actual.Should().StartWith("Windows 10.0 20201"); - actual.Should().EndWith("Tot: 671 3245 21934"); + actual.ShouldStartWith("Windows 10.0 20201"); + actual.ShouldEndWith("Tot: 671 3245 21934"); } } } diff --git a/src/Cake.7zip.Tests/Parsers/HashOutputParserTests.cs b/src/Cake.7zip.Tests/Parsers/HashOutputParserTests.cs index 8bc02164..2603dc90 100644 --- a/src/Cake.7zip.Tests/Parsers/HashOutputParserTests.cs +++ b/src/Cake.7zip.Tests/Parsers/HashOutputParserTests.cs @@ -3,7 +3,7 @@ using Cake.SevenZip.Parsers; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -19,7 +19,7 @@ public void HashParser_parses_InfoLine() var actual = parser.Parse(Outputs.Hash); const string expected = "7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21"; - actual.Information.Should().Be(expected); + actual.Information.ShouldBe(expected); } [Fact] @@ -28,16 +28,16 @@ public void HashParser_parses_Files_ok() var parser = new HashOutputParser(); var actual = parser.Parse(Outputs.Hash).Files.Single(); - actual.FilePath.Should().Be("docs\\input\\index.cshtml"); - actual.Size.Should().Be(1450); + actual.FilePath.ShouldBe("docs\\input\\index.cshtml"); + actual.Size.ShouldBe(1450); // hashes var hashes = actual.Hashes.ToList(); - hashes.Single(x => x.HashFunction == "CRC32").Hash.Should().Be("65F628E7"); - hashes.Single(x => x.HashFunction == "CRC64").Hash.Should().Be("0C263A6A38541BE2"); - hashes.Single(x => x.HashFunction == "SHA1").Hash.Should().Be("30A96827A2BD56E1139FFA1988E53C6BDB400D5D"); - hashes.Single(x => x.HashFunction == "SHA256").Hash.Should().Be("735E9C514689F10220846742C8871A665F5888D5C36F71F949C70D9B5FBBFBD6"); - hashes.Single(x => x.HashFunction == "BLAKE2sp").Hash.Should().Be("46569382381890A5F29264F0B7EA8EE3628C714911AE43839CC444490033BABD"); + hashes.Single(x => x.HashFunction == "CRC32").Hash.ShouldBe("65F628E7"); + hashes.Single(x => x.HashFunction == "CRC64").Hash.ShouldBe("0C263A6A38541BE2"); + hashes.Single(x => x.HashFunction == "SHA1").Hash.ShouldBe("30A96827A2BD56E1139FFA1988E53C6BDB400D5D"); + hashes.Single(x => x.HashFunction == "SHA256").Hash.ShouldBe("735E9C514689F10220846742C8871A665F5888D5C36F71F949C70D9B5FBBFBD6"); + hashes.Single(x => x.HashFunction == "BLAKE2sp").Hash.ShouldBe("46569382381890A5F29264F0B7EA8EE3628C714911AE43839CC444490033BABD"); } [Fact] @@ -46,11 +46,11 @@ public void HashParser_parses_SumOfHashes_Ok() var parser = new HashOutputParser(); var actual = parser.Parse(Outputs.Hash).SumOfHashes.ToList(); - actual.Single(x => x.HashFunction == "CRC32").Hash.Should().Be("65F628E7"); - actual.Single(x => x.HashFunction == "CRC64").Hash.Should().Be("0C263A6A38541BE2"); - actual.Single(x => x.HashFunction == "SHA1").Hash.Should().Be("30A96827A2BD56E1139FFA1988E53C6BDB400D5D"); - actual.Single(x => x.HashFunction == "SHA256").Hash.Should().Be("735E9C514689F10220846742C8871A665F5888D5C36F71F949C70D9B5FBBFBD6"); - actual.Single(x => x.HashFunction == "BLAKE2sp").Hash.Should().Be("46569382381890A5F29264F0B7EA8EE3628C714911AE43839CC444490033BABD"); + actual.Single(x => x.HashFunction == "CRC32").Hash.ShouldBe("65F628E7"); + actual.Single(x => x.HashFunction == "CRC64").Hash.ShouldBe("0C263A6A38541BE2"); + actual.Single(x => x.HashFunction == "SHA1").Hash.ShouldBe("30A96827A2BD56E1139FFA1988E53C6BDB400D5D"); + actual.Single(x => x.HashFunction == "SHA256").Hash.ShouldBe("735E9C514689F10220846742C8871A665F5888D5C36F71F949C70D9B5FBBFBD6"); + actual.Single(x => x.HashFunction == "BLAKE2sp").Hash.ShouldBe("46569382381890A5F29264F0B7EA8EE3628C714911AE43839CC444490033BABD"); } [Fact] @@ -59,11 +59,11 @@ public void HashParser_parses_HashOfData_Ok() var parser = new HashOutputParser(); var actual = parser.Parse(Outputs.Hash).HashesOfData.ToList(); - actual.Single(x => x.HashFunction == "CRC32").Hash.Should().Be("65F628E7"); - actual.Single(x => x.HashFunction == "CRC64").Hash.Should().Be("0C263A6A38541BE2"); - actual.Single(x => x.HashFunction == "SHA1").Hash.Should().Be("30A96827A2BD56E1139FFA1988E53C6BDB400D5D"); - actual.Single(x => x.HashFunction == "SHA256").Hash.Should().Be("735E9C514689F10220846742C8871A665F5888D5C36F71F949C70D9B5FBBFBD6"); - actual.Single(x => x.HashFunction == "BLAKE2sp").Hash.Should().Be("46569382381890A5F29264F0B7EA8EE3628C714911AE43839CC444490033BABD"); + actual.Single(x => x.HashFunction == "CRC32").Hash.ShouldBe("65F628E7"); + actual.Single(x => x.HashFunction == "CRC64").Hash.ShouldBe("0C263A6A38541BE2"); + actual.Single(x => x.HashFunction == "SHA1").Hash.ShouldBe("30A96827A2BD56E1139FFA1988E53C6BDB400D5D"); + actual.Single(x => x.HashFunction == "SHA256").Hash.ShouldBe("735E9C514689F10220846742C8871A665F5888D5C36F71F949C70D9B5FBBFBD6"); + actual.Single(x => x.HashFunction == "BLAKE2sp").Hash.ShouldBe("46569382381890A5F29264F0B7EA8EE3628C714911AE43839CC444490033BABD"); } [Fact] @@ -72,11 +72,11 @@ public void HashParser_parses_HashOfDataAndNames_Ok() var parser = new HashOutputParser(); var actual = parser.Parse(Outputs.Hash).HashOfDataAndNames.ToList(); - actual.Single(x => x.HashFunction == "CRC32").Hash.Should().Be("DDEFD8B7"); - actual.Single(x => x.HashFunction == "CRC64").Hash.Should().Be("7914AFBA69DF8351"); - actual.Single(x => x.HashFunction == "SHA1").Hash.Should().Be("4B179021A00AE3AD7ACD2044212EF055CD31C6D8"); - actual.Single(x => x.HashFunction == "SHA256").Hash.Should().Be("22B8DE058E187C59B75D3E385864B8713E1A1D8315E137526E6BD069936B342A"); - actual.Single(x => x.HashFunction == "BLAKE2sp").Hash.Should().Be("222855D590C06DE9B42BF15335DBC6EF14798938E202808A5C7DFE9BC38F8F25"); + actual.Single(x => x.HashFunction == "CRC32").Hash.ShouldBe("DDEFD8B7"); + actual.Single(x => x.HashFunction == "CRC64").Hash.ShouldBe("7914AFBA69DF8351"); + actual.Single(x => x.HashFunction == "SHA1").Hash.ShouldBe("4B179021A00AE3AD7ACD2044212EF055CD31C6D8"); + actual.Single(x => x.HashFunction == "SHA256").Hash.ShouldBe("22B8DE058E187C59B75D3E385864B8713E1A1D8315E137526E6BD069936B342A"); + actual.Single(x => x.HashFunction == "BLAKE2sp").Hash.ShouldBe("222855D590C06DE9B42BF15335DBC6EF14798938E202808A5C7DFE9BC38F8F25"); } [Fact] @@ -85,7 +85,7 @@ public void HashParser_parses_SumOfSizes_Ok() var parser = new HashOutputParser(); var actual = parser.Parse(Outputs.Hash).SumOfSizes; - actual.Should().Be(1450); + actual.ShouldBe(1450); } } } diff --git a/src/Cake.7zip.Tests/Parsers/InformationOutputParserTests.cs b/src/Cake.7zip.Tests/Parsers/InformationOutputParserTests.cs index 4d007d88..487bdf5e 100644 --- a/src/Cake.7zip.Tests/Parsers/InformationOutputParserTests.cs +++ b/src/Cake.7zip.Tests/Parsers/InformationOutputParserTests.cs @@ -3,7 +3,7 @@ using Cake.SevenZip.Parsers; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -19,7 +19,7 @@ public void InformationParser_parses_InfoLine() var actual = parser.Parse(Outputs.Information); const string expected = "7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21"; - actual.Information.Should().Be(expected); + actual.Information.ShouldBe(expected); } [Fact] @@ -53,7 +53,7 @@ 0 D 40305 Rar5 0 ED 6F10701 7zAES 0 ED 6F00181 AES256CBC".ToArrayOfLines(); - actual.Should().BeEquivalentTo(expected); + actual.ShouldBe(expected, true); } [Fact] @@ -64,7 +64,7 @@ public void InformationParser_parses_Libs() var actual = parser.Parse(Outputs.Information).Libs.ToList(); var expected = new[] { @" 0 C:\Program Files\7-Zip\7z.dll" }; - actual.Should().BeEquivalentTo(expected); + actual.ShouldBe(expected, true); } [Fact] @@ -80,7 +80,7 @@ 0 32 A SHA256 0 8 4 CRC64 0 32 202 BLAKE2sp".ToArrayOfLines(); - actual.Should().BeEquivalentTo(expected); + actual.ShouldBe(expected, true); } [Fact] @@ -146,7 +146,7 @@ 0 C SN LH wim wim swm esd ppkg M S W I M 00 00 00 0 C FMG zip zip z01 zipx jar xpi odt ods docx xlsx epub ipa apk appx P K 03 04 || P K 05 06 || P K 06 06 || P K 07 08 P K || P K 0 0 P K" .ToArrayOfLines(); - actual.Should().BeEquivalentTo(expected); + actual.ShouldBe(expected, true); } } } diff --git a/src/Cake.7zip.Tests/Parsers/ListOutputParserTests.cs b/src/Cake.7zip.Tests/Parsers/ListOutputParserTests.cs index 607025e4..43a3f86d 100644 --- a/src/Cake.7zip.Tests/Parsers/ListOutputParserTests.cs +++ b/src/Cake.7zip.Tests/Parsers/ListOutputParserTests.cs @@ -3,7 +3,7 @@ using Cake.SevenZip.Parsers; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -19,7 +19,7 @@ public void ListParser_parses_InfoLine() var actual = parser.Parse(Outputs.List.SingleArchive); const string expected = "7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21"; - actual.Information.Should().Be(expected); + actual.Information.ShouldBe(expected); } [Fact] @@ -29,8 +29,8 @@ public void ListParser_parses_summary() var actual = parser.Parse(Outputs.List.MultipleArchives); - actual.CompressedSize.Should().Be(2245123); - actual.Size.Should().Be(7536552); + actual.CompressedSize.ShouldBe(2245123); + actual.Size.ShouldBe(7536552); } [Fact] @@ -40,8 +40,8 @@ public void ListParser_parses_summary_singleArchive() var actual = parser.Parse(Outputs.List.SingleArchive); - actual.CompressedSize.Should().Be(644); - actual.Size.Should().Be(6078); + actual.CompressedSize.ShouldBe(644); + actual.Size.ShouldBe(6078); } [Fact] @@ -51,7 +51,7 @@ public void ListParser_parses_archives() var actual = parser.Parse(Outputs.List.MultipleArchives).Archives; - actual.Should().HaveCount(2); + actual.Count().ShouldBe(2); } [Fact] @@ -61,12 +61,14 @@ public void ListParser_parses_archive_contents() var actual = parser.Parse(Outputs.List.MultipleArchives).Archives.Single(x => x.Path == @"..\Cake.7Zip.Test\fluent.zip"); - actual.Files.Select(x => x.Name).Should().BeEquivalentTo("a.txt", "b.txt"); - actual.ArchiveDate.Should().BeCloseTo(new System.DateTime(2020, 06, 16, 22, 07, 43, 0)); - actual.CompressedSize.Should().Be(1288); - actual.Size.Should().Be(12156); - actual.PhysicalSize.Should().Be(788); - actual.Type.Should().Be("zip"); + actual.Files.Select(x => x.Name).ShouldBe(new[]{"a.txt", "b.txt"}, true); + actual.ArchiveDate.ShouldBeInRange( + new System.DateTime(2020, 06, 16, 22, 07, 43, 0), + new System.DateTime(2020, 06, 16, 22, 07, 43, 999)); + actual.CompressedSize.ShouldBe(1288); + actual.Size.ShouldBe(12156); + actual.PhysicalSize.ShouldBe(788); + actual.Type.ShouldBe("zip"); } [Fact] @@ -79,10 +81,12 @@ public void ListParser_parses_file() .Files .Single(x => x.Name == @"b.txt"); - actual.FileDate.Should().BeCloseTo(new System.DateTime(2020, 06, 16, 22, 07, 44, 0)); - actual.CompressedSize.Should().Be(645); - actual.Size.Should().Be(6079); - actual.Attributes.Should().Be("....A"); + actual.FileDate.ShouldBeInRange( + new System.DateTime(2020, 06, 16, 22, 07, 44, 0), + new System.DateTime(2020, 06, 16, 22, 07, 44, 999)); + actual.CompressedSize.ShouldBe(645); + actual.Size.ShouldBe(6079); + actual.Attributes.ShouldBe("....A"); } } } diff --git a/src/Cake.7zip.Tests/Parsers/TestOutputParserTests.cs b/src/Cake.7zip.Tests/Parsers/TestOutputParserTests.cs index 0ad2cd6f..dc64afab 100644 --- a/src/Cake.7zip.Tests/Parsers/TestOutputParserTests.cs +++ b/src/Cake.7zip.Tests/Parsers/TestOutputParserTests.cs @@ -3,7 +3,7 @@ using Cake.SevenZip.Parsers; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -19,7 +19,7 @@ public void TestParser_parses_InfoLine() var actual = parser.Parse(Outputs.Test); const string expected = "7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21"; - actual.Information.Should().Be(expected); + actual.Information.ShouldBe(expected); } [Fact] @@ -34,8 +34,8 @@ Everything is Ok var actual = parser.Parse(Outputs.Test).Archives.Single(x => x.IsOk); - actual.FileName.Should().Be(".\\nested.zip"); - actual.Output.UnifyLineEndings().Should().Be(expected); + actual.FileName.ShouldBe(".\\nested.zip"); + actual.Output.UnifyLineEndings().ShouldBe(expected); } [Fact] @@ -51,8 +51,8 @@ Is not archive var actual = parser.Parse(Outputs.Test).Archives.Single(x => !x.IsOk); - actual.FileName.Should().Be("foo.zip"); - actual.Output.UnifyLineEndings().Should().Be(expected); + actual.FileName.ShouldBe("foo.zip"); + actual.Output.UnifyLineEndings().ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/Settings/Switches/SwitchArchiveTypeTests.cs b/src/Cake.7zip.Tests/Settings/Switches/SwitchArchiveTypeTests.cs index ba20ae51..74322116 100644 --- a/src/Cake.7zip.Tests/Settings/Switches/SwitchArchiveTypeTests.cs +++ b/src/Cake.7zip.Tests/Settings/Switches/SwitchArchiveTypeTests.cs @@ -4,7 +4,7 @@ using Cake.SevenZip.Switches; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -21,7 +21,7 @@ public void ArchiveType_StaticProps_works(SwitchArchiveType type, string expecte var actual = fixture.Parse(b => type.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Theory] @@ -33,7 +33,7 @@ public void ArchiveType_StaticPropsSplit_works(SwitchArchiveType type, string ex var actual = fixture.Parse(b => type.Volumes().BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } private class TestData : IEnumerable diff --git a/src/Cake.7zip.Tests/Settings/Switches/SwitchCompressionMethodTests.cs b/src/Cake.7zip.Tests/Settings/Switches/SwitchCompressionMethodTests.cs index c668e79f..b2bcf26f 100644 --- a/src/Cake.7zip.Tests/Settings/Switches/SwitchCompressionMethodTests.cs +++ b/src/Cake.7zip.Tests/Settings/Switches/SwitchCompressionMethodTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Switches; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -21,7 +21,7 @@ public void CompressionMethod_level_works() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -36,7 +36,7 @@ public void CompressionMethod_method_works() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -52,7 +52,7 @@ public void CompressionMethod_combining_method_and_level() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/Settings/Switches/SwitchDeleteAfterCompressionTests.cs b/src/Cake.7zip.Tests/Settings/Switches/SwitchDeleteAfterCompressionTests.cs index 2b2ac805..a1bcd2ed 100644 --- a/src/Cake.7zip.Tests/Settings/Switches/SwitchDeleteAfterCompressionTests.cs +++ b/src/Cake.7zip.Tests/Settings/Switches/SwitchDeleteAfterCompressionTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Switches; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -18,7 +18,7 @@ public void Sdel_set_outputs_switch() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -30,7 +30,7 @@ public void Sdel_not_set_outputs_nothing() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/Settings/Switches/SwitchDisableParsingOfArchiveNameTests.cs b/src/Cake.7zip.Tests/Settings/Switches/SwitchDisableParsingOfArchiveNameTests.cs index b12bdafb..ddcee09f 100644 --- a/src/Cake.7zip.Tests/Settings/Switches/SwitchDisableParsingOfArchiveNameTests.cs +++ b/src/Cake.7zip.Tests/Settings/Switches/SwitchDisableParsingOfArchiveNameTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Switches; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -18,7 +18,7 @@ public void DisableParsingOfArchiveName_set_outputs_switch() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -30,7 +30,7 @@ public void DisableParsingOfArchiveName_not_set_outputs_nothing() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/Settings/Switches/SwitchExcludeArchiveFilenamesTests.cs b/src/Cake.7zip.Tests/Settings/Switches/SwitchExcludeArchiveFilenamesTests.cs index deee09a3..e75d8a57 100644 --- a/src/Cake.7zip.Tests/Settings/Switches/SwitchExcludeArchiveFilenamesTests.cs +++ b/src/Cake.7zip.Tests/Settings/Switches/SwitchExcludeArchiveFilenamesTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Switches; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -20,7 +20,7 @@ public void Exclude_multiple_files_outputs_multiple_switches() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -32,7 +32,7 @@ public void Exclude_with_Recurse_enabled__outputs_r() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -44,7 +44,7 @@ public void Exclude_with_Recurse_disabled_outputs_r_minus() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -56,7 +56,7 @@ public void Exclude_with_Recurse_Wildcards_outputs_r_zero() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -68,7 +68,7 @@ public void Exclude_without_Recurse_outputs_no_recurse() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/Settings/Switches/SwitchExcludeFilenamesTests.cs b/src/Cake.7zip.Tests/Settings/Switches/SwitchExcludeFilenamesTests.cs index 63c96367..81b4401c 100644 --- a/src/Cake.7zip.Tests/Settings/Switches/SwitchExcludeFilenamesTests.cs +++ b/src/Cake.7zip.Tests/Settings/Switches/SwitchExcludeFilenamesTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Switches; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -20,7 +20,7 @@ public void Exclude_multiple_files_outputs_multiple_switches() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -32,7 +32,7 @@ public void Exclude_with_Recurse_enabled__outputs_r() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -44,7 +44,7 @@ public void Exclude_with_Recurse_disabled_outputs_r_minus() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -56,7 +56,7 @@ public void Exclude_with_Recurse_Wildcards_outputs_r_zero() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -68,7 +68,7 @@ public void Exclude_without_Recurse_outputs_no_recurse() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/Settings/Switches/SwitchIncludeArchiveFilenamesTests.cs b/src/Cake.7zip.Tests/Settings/Switches/SwitchIncludeArchiveFilenamesTests.cs index 1a6e83ac..962abdf4 100644 --- a/src/Cake.7zip.Tests/Settings/Switches/SwitchIncludeArchiveFilenamesTests.cs +++ b/src/Cake.7zip.Tests/Settings/Switches/SwitchIncludeArchiveFilenamesTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Switches; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -20,7 +20,7 @@ public void Include_multiple_files_outputs_multiple_switches() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -32,7 +32,7 @@ public void Include_with_Recurse_enabled__outputs_r() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -44,7 +44,7 @@ public void Include_with_Recurse_disabled_outputs_r_minus() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -56,7 +56,7 @@ public void Include_with_Recurse_Wildcards_outputs_r_zero() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -68,7 +68,7 @@ public void Include_without_Recurse_outputs_no_recurse() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/Settings/Switches/SwitchIncludeFilenamesTests.cs b/src/Cake.7zip.Tests/Settings/Switches/SwitchIncludeFilenamesTests.cs index 7bed4b2c..fa1ec36d 100644 --- a/src/Cake.7zip.Tests/Settings/Switches/SwitchIncludeFilenamesTests.cs +++ b/src/Cake.7zip.Tests/Settings/Switches/SwitchIncludeFilenamesTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Switches; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -20,7 +20,7 @@ public void Include_multiple_files_outputs_multiple_switches() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -32,7 +32,7 @@ public void Include_with_Recurse_enabled__outputs_r() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -44,7 +44,7 @@ public void Include_with_Recurse_disabled_outputs_r_minus() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -56,7 +56,7 @@ public void Include_with_Recurse_Wildcards_outputs_r_zero() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -68,7 +68,7 @@ public void Include_without_Recurse_outputs_no_recurse() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/Settings/Switches/SwitchOutputDirectoryTests.cs b/src/Cake.7zip.Tests/Settings/Switches/SwitchOutputDirectoryTests.cs index e80f4d0b..a184d8e4 100644 --- a/src/Cake.7zip.Tests/Settings/Switches/SwitchOutputDirectoryTests.cs +++ b/src/Cake.7zip.Tests/Settings/Switches/SwitchOutputDirectoryTests.cs @@ -2,7 +2,7 @@ using Cake.SevenZip.Switches; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -19,7 +19,7 @@ public void OutputDirectory_works() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/Settings/Switches/SwitchOverwriteModeTests.cs b/src/Cake.7zip.Tests/Settings/Switches/SwitchOverwriteModeTests.cs index 9d150b23..d183e26d 100644 --- a/src/Cake.7zip.Tests/Settings/Switches/SwitchOverwriteModeTests.cs +++ b/src/Cake.7zip.Tests/Settings/Switches/SwitchOverwriteModeTests.cs @@ -4,7 +4,7 @@ using Cake.SevenZip.Switches; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -21,14 +21,14 @@ public void OverwriteMode_sets_switch() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Theory] [ClassData(typeof(TestData))] public void OverwriteMode_work(OverwriteMode mode, string expected) { - mode.ToString().Should().Be(expected); + mode.ToString().ShouldBe(expected); } private class TestData : IEnumerable diff --git a/src/Cake.7zip.Tests/Settings/Switches/SwitchPasswordTests.cs b/src/Cake.7zip.Tests/Settings/Switches/SwitchPasswordTests.cs index c3298353..9672d635 100644 --- a/src/Cake.7zip.Tests/Settings/Switches/SwitchPasswordTests.cs +++ b/src/Cake.7zip.Tests/Settings/Switches/SwitchPasswordTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Switches; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -18,7 +18,7 @@ public void Password_works() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -30,7 +30,7 @@ public void Password_is_secret() var actual = fixture.ParseSafe(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/Settings/Switches/SwitchRecurseSubdirectoriesTests.cs b/src/Cake.7zip.Tests/Settings/Switches/SwitchRecurseSubdirectoriesTests.cs index 32842720..0e1c0386 100644 --- a/src/Cake.7zip.Tests/Settings/Switches/SwitchRecurseSubdirectoriesTests.cs +++ b/src/Cake.7zip.Tests/Settings/Switches/SwitchRecurseSubdirectoriesTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Switches; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -18,7 +18,7 @@ public void Recurse_set_outputs_r() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -30,7 +30,7 @@ public void Recurse_unset_outputs_r_minus() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -42,7 +42,7 @@ public void Recurse_wildcard_outputs_r_zero() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/Settings/Switches/SwitchSetHashFunctionTests.cs b/src/Cake.7zip.Tests/Settings/Switches/SwitchSetHashFunctionTests.cs index a86ae439..ba76bb1d 100644 --- a/src/Cake.7zip.Tests/Settings/Switches/SwitchSetHashFunctionTests.cs +++ b/src/Cake.7zip.Tests/Settings/Switches/SwitchSetHashFunctionTests.cs @@ -4,7 +4,7 @@ using Cake.SevenZip.Switches; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -21,7 +21,7 @@ public void SwitchSetHashFunction_single_sets_single_hash_output(SwitchSetHashFu var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } private class SwitchTestData : IEnumerable diff --git a/src/Cake.7zip.Tests/Settings/Switches/SwitchShowTechnicalInformationTests.cs b/src/Cake.7zip.Tests/Settings/Switches/SwitchShowTechnicalInformationTests.cs index 112e9676..50b2d0b3 100644 --- a/src/Cake.7zip.Tests/Settings/Switches/SwitchShowTechnicalInformationTests.cs +++ b/src/Cake.7zip.Tests/Settings/Switches/SwitchShowTechnicalInformationTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Switches; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -18,7 +18,7 @@ public void Sdel_set_outputs_switch() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -30,7 +30,7 @@ public void Sdel_not_set_outputs_nothing() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/Settings/Switches/SwitchSniTests.cs b/src/Cake.7zip.Tests/Settings/Switches/SwitchSniTests.cs index 3d0cb8a4..42bff078 100644 --- a/src/Cake.7zip.Tests/Settings/Switches/SwitchSniTests.cs +++ b/src/Cake.7zip.Tests/Settings/Switches/SwitchSniTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Switches; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -18,7 +18,7 @@ public void Sni_set_outputs_switch() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -30,7 +30,7 @@ public void Sni_not_set_outputs_nothing() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/Settings/Switches/SwitchSnsTests.cs b/src/Cake.7zip.Tests/Settings/Switches/SwitchSnsTests.cs index 9ab81ec2..7537dab4 100644 --- a/src/Cake.7zip.Tests/Settings/Switches/SwitchSnsTests.cs +++ b/src/Cake.7zip.Tests/Settings/Switches/SwitchSnsTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Switches; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -18,7 +18,7 @@ public void Sns_set_outputs_switch() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -30,7 +30,7 @@ public void Sns_not_set_outputs_nothing() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/Settings/Switches/SwitchSswTests.cs b/src/Cake.7zip.Tests/Settings/Switches/SwitchSswTests.cs index 6c954335..1adb3478 100644 --- a/src/Cake.7zip.Tests/Settings/Switches/SwitchSswTests.cs +++ b/src/Cake.7zip.Tests/Settings/Switches/SwitchSswTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Switches; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -18,7 +18,7 @@ public void Ssw_set_outputs_switch() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -30,7 +30,7 @@ public void Ssw_not_set_outputs_nothing() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/Settings/Switches/SwitchStlTests.cs b/src/Cake.7zip.Tests/Settings/Switches/SwitchStlTests.cs index 368dd285..b7cdb17f 100644 --- a/src/Cake.7zip.Tests/Settings/Switches/SwitchStlTests.cs +++ b/src/Cake.7zip.Tests/Settings/Switches/SwitchStlTests.cs @@ -1,7 +1,7 @@ using Cake.SevenZip.Switches; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -18,7 +18,7 @@ public void Stl_set_outputs_switch() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -30,7 +30,7 @@ public void Stl_not_set_outputs_nothing() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/Settings/Switches/SwitchUpdateOptionsTests.cs b/src/Cake.7zip.Tests/Settings/Switches/SwitchUpdateOptionsTests.cs index d71f6302..f25a05ca 100644 --- a/src/Cake.7zip.Tests/Settings/Switches/SwitchUpdateOptionsTests.cs +++ b/src/Cake.7zip.Tests/Settings/Switches/SwitchUpdateOptionsTests.cs @@ -3,7 +3,7 @@ using Cake.SevenZip.Switches; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -23,7 +23,7 @@ public void UpdateAction_sets_p() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -38,7 +38,7 @@ public void UpdateAction_sets_q() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -53,7 +53,7 @@ public void UpdateAction_sets_r() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -68,7 +68,7 @@ public void UpdateAction_sets_x() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -83,7 +83,7 @@ public void UpdateAction_sets_y() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -98,7 +98,7 @@ public void UpdateAction_sets_z() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -113,7 +113,7 @@ public void UpdateAction_sets_w() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -128,7 +128,7 @@ public void UpdateAction_sets_NewName() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -150,7 +150,7 @@ public void UpdateAction_sets_CombinedValues() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Theory] @@ -164,8 +164,8 @@ public void UpdateActions_work(string propertyName, string expected) // ReSharper disable once PossibleNullReferenceException - not really var updateAction = updateActionProp.GetValue(null); - updateAction.Should().NotBeNull(); - updateAction.ToString().Should().Be(expected); + updateAction.ShouldNotBeNull(); + updateAction.ToString().ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/Settings/Switches/SwitchVolumeTests.cs b/src/Cake.7zip.Tests/Settings/Switches/SwitchVolumeTests.cs index b54d6fc5..7291653d 100644 --- a/src/Cake.7zip.Tests/Settings/Switches/SwitchVolumeTests.cs +++ b/src/Cake.7zip.Tests/Settings/Switches/SwitchVolumeTests.cs @@ -4,7 +4,7 @@ using Cake.SevenZip.Switches; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -26,7 +26,7 @@ public void Volumes_with_Bytes_work() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -42,7 +42,7 @@ public void Volumes_with_Kilobytes_work() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -58,7 +58,7 @@ public void Volumes_with_Megabytes_work() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -74,7 +74,7 @@ public void Volumes_with_Gigabytes_work() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -89,7 +89,7 @@ public void Volumes_without_Units_work() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -104,7 +104,7 @@ public void Should_Throw_On_Volumes_without_Site() fixture.Parse(b => sut.BuildArguments(ref b)); }; - result.Should().Throw().WithMessage(expectedMessage); + result.ShouldThrow().Message.ShouldBe(expectedMessage); } [Fact] @@ -122,7 +122,7 @@ public void Should_Throw_On_Volumes_with_negative_Site() fixture.Parse(b => sut.BuildArguments(ref b)); }; - result.Should().Throw().WithMessage(expectedMessage); + result.ShouldThrow().Message.ShouldBe(expectedMessage); } } } diff --git a/src/Cake.7zip.Tests/Settings/Switches/SwitchWorkingDirectoryTests.cs b/src/Cake.7zip.Tests/Settings/Switches/SwitchWorkingDirectoryTests.cs index 2bb598e0..19d2fa20 100644 --- a/src/Cake.7zip.Tests/Settings/Switches/SwitchWorkingDirectoryTests.cs +++ b/src/Cake.7zip.Tests/Settings/Switches/SwitchWorkingDirectoryTests.cs @@ -2,7 +2,7 @@ using Cake.SevenZip.Switches; using Cake.SevenZip.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -19,7 +19,7 @@ public void WorkingDirectory_works() var actual = fixture.Parse(b => sut.BuildArguments(ref b)); - actual.Should().Be(expected); + actual.ShouldBe(expected); } } } diff --git a/src/Cake.7zip.Tests/SevenZipRunnerTests.cs b/src/Cake.7zip.Tests/SevenZipRunnerTests.cs index eb27c4ac..ae76823e 100644 --- a/src/Cake.7zip.Tests/SevenZipRunnerTests.cs +++ b/src/Cake.7zip.Tests/SevenZipRunnerTests.cs @@ -9,7 +9,7 @@ using Cake.SevenZip.Tests.Fixtures; using Cake.Testing; -using FluentAssertions; +using Shouldly; using Moq; @@ -30,7 +30,7 @@ public void Should_Throw_If_Settings_Are_Null() fixture.Run(); }; - result.Should().Throw(); + result.ShouldThrow(); } [Fact] @@ -51,7 +51,7 @@ public void Should_Throw_If_SevenZip_Executable_Was_Not_Found() fixture.Run(); }; - result.Should().Throw().WithMessage(expectedMessage); + result.ShouldThrow().Message.ShouldBe(expectedMessage); } [Fact] @@ -71,7 +71,7 @@ public void Should_Throw_If_Command_is_null() fixture.Run(); }; - result.Should().Throw().WithMessage(expectedMessage); + result.ShouldThrow().Message.ShouldBe(expectedMessage); } [Fact] @@ -103,7 +103,7 @@ public void Should_Access_registry() sevenZipKey.Verify(k => k.GetValue("Path"), Times.Once); sevenZipKey.Verify(k => k.GetValue("Path64"), Times.Once); - result.Path.FullPath.Should().Be(file.Path.FullPath); + result.Path.FullPath.ShouldBe(file.Path.FullPath); } [Fact] @@ -134,7 +134,7 @@ public void Should_Access_64bit_tool_from_registry() var result = fixture.Run(); - result.Path.FullPath.Should().Be(file.Path.FullPath); + result.Path.FullPath.ShouldBe(file.Path.FullPath); } [Fact] @@ -162,7 +162,7 @@ public void Should_not_access_registry_if_Default_exists() var result = fixture.Run(); sevenZipKey.Verify(k => k.GetValue("Path"), Times.Never); - result.Path.FullPath.Should().Be(fixture.DefaultToolPath.FullPath); + result.Path.FullPath.ShouldBe(fixture.DefaultToolPath.FullPath); } [Fact] @@ -186,7 +186,7 @@ public void Should_throw_ToolNotFound_if_registry_throws() fixture.Run(); }; - action.Should().Throw(); + action.ShouldThrow(); } [Fact] @@ -207,7 +207,7 @@ public void Can_zip_some_Files() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -239,7 +239,7 @@ public void Can_zip_and_split_some_Files() var actual = fixture.EvaluateArgs(); - actual.Should().Be(expected); + actual.ShouldBe(expected); } [Fact] @@ -262,7 +262,7 @@ public void Should_Throw_CakeException_If_Command_throws() fixture.Run(); }; - result.Should().Throw().WithMessage(expectedMessage); + result.ShouldThrow().Message.ShouldBe(expectedMessage); } [Fact] diff --git a/src/Cake.7zip.sln.DotSettings b/src/Cake.7zip.sln.DotSettings index ed3964a6..8612fa20 100644 --- a/src/Cake.7zip.sln.DotSettings +++ b/src/Cake.7zip.sln.DotSettings @@ -1,3 +1,4 @@ - + DO_NOT_SHOW - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> \ No newline at end of file + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + True \ No newline at end of file diff --git a/src/Cake.7zip/Cake.7zip.csproj b/src/Cake.7zip/Cake.7zip.csproj index 1a2c68c7..ed87139a 100644 --- a/src/Cake.7zip/Cake.7zip.csproj +++ b/src/Cake.7zip/Cake.7zip.csproj @@ -11,6 +11,7 @@ + @@ -30,6 +31,7 @@ https://github.com/cake-contrib/Cake.7zip/releases Cake.SevenZip 0.0.1 + README.md @@ -38,8 +40,8 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -47,18 +49,10 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - runtime; build; native; contentfiles; analyzers all - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - \ No newline at end of file +