Skip to content

Commit

Permalink
(chocolatey#2893) Switch from Should to FluentAssertions
Browse files Browse the repository at this point in the history
This switches chocolatey.tests and chocolatey.tests.integration
to use FluentAssertions instead of Should. This is because Should
is no longer actively maintained, so it is time to replace it.

The Fluent Assertions Analyzers are also added in this commit.

Only the package and dependencies are switched. The code
changes be in the next commit.
  • Loading branch information
TheCakeIsNaOH authored and AdmiringWorm committed Jun 6, 2023
1 parent e3e2ba8 commit 3bdeb93
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@
<Reference Include="Chocolatey.NuGet.Versioning">
<HintPath>..\packages\Chocolatey.NuGet.Versioning.3.2.0\lib\net472\Chocolatey.NuGet.Versioning.dll</HintPath>
</Reference>
<Reference Include="FluentAssertions, Version=6.11.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.6.11.0\lib\net47\FluentAssertions.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
</Reference>
Expand All @@ -111,9 +114,6 @@
<Reference Include="nunit.framework, Version=3.13.3.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.13.3\lib\net40\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="Should, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Should.1.1.20\lib\Should.dll</HintPath>
</Reference>
<Reference Include="SimpleInjector, Version=2.8.3.0, Culture=neutral, PublicKeyToken=984cb50dea722e99, processorArchitecture=MSIL">
<HintPath>..\packages\SimpleInjector.2.8.3\lib\net45\SimpleInjector.dll</HintPath>
</Reference>
Expand Down Expand Up @@ -207,7 +207,9 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Analyzer Include="..\packages\FluentAssertions.Analyzers.0.19.1\analyzers\dotnet\cs\FluentAssertions.Analyzers.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
Expand Down
3 changes: 2 additions & 1 deletion src/chocolatey.tests.integration/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
<package id="Chocolatey.NuGet.Packaging" version="3.2.0" targetFramework="net48" />
<package id="Chocolatey.NuGet.Protocol" version="3.2.0" targetFramework="net48" />
<package id="Chocolatey.NuGet.Versioning" version="3.2.0" targetFramework="net48" />
<package id="FluentAssertions" version="6.11.0" targetFramework="net48" />
<package id="FluentAssertions.Analyzers" version="0.19.1" targetFramework="net48" developmentDependency="true" />
<package id="log4net" version="2.0.12" targetFramework="net48" />
<package id="Microsoft.Web.Xdt" version="3.1.0" targetFramework="net48" />
<package id="Moq" version="4.2.1402.2112" targetFramework="net40" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
<package id="NUnit" version="3.13.3" targetFramework="net48" />
<package id="NUnit3TestAdapter" version="4.4.2" targetFramework="net48" />
<package id="Should" version="1.1.20" targetFramework="net48" />
<package id="SimpleInjector" version="2.8.3" targetFramework="net48" />
<package id="System.Reactive" version="5.0.0" targetFramework="net48" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.3" targetFramework="net48" />
Expand Down
16 changes: 12 additions & 4 deletions src/chocolatey.tests/chocolatey.tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@
<Reference Include="Chocolatey.NuGet.Versioning">
<HintPath>..\packages\Chocolatey.NuGet.Versioning.3.2.0\lib\net472\Chocolatey.NuGet.Versioning.dll</HintPath>
</Reference>
<Reference Include="FluentAssertions, Version=6.11.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.6.11.0\lib\net47\FluentAssertions.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
</Reference>
Expand All @@ -132,9 +135,6 @@
<Reference Include="nunit.framework, Version=3.13.3.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.13.3\lib\net40\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="Should, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Should.1.1.20\lib\Should.dll</HintPath>
</Reference>
<Reference Include="SimpleInjector, Version=2.8.3.0, Culture=neutral, PublicKeyToken=984cb50dea722e99, processorArchitecture=MSIL">
<HintPath>..\packages\SimpleInjector.2.8.3\lib\net45\SimpleInjector.dll</HintPath>
</Reference>
Expand All @@ -146,8 +146,14 @@
<Reference Include="System.IO.Compression" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Security" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
Expand Down Expand Up @@ -226,7 +232,9 @@
<Name>chocolatey.console</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Analyzer Include="..\packages\FluentAssertions.Analyzers.0.19.1\analyzers\dotnet\cs\FluentAssertions.Analyzers.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
Expand Down
5 changes: 4 additions & 1 deletion src/chocolatey.tests/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@
<package id="Chocolatey.NuGet.Protocol" version="3.2.0" targetFramework="net48" />
<package id="Chocolatey.NuGet.Resolver" version="3.2.0" targetFramework="net48" />
<package id="Chocolatey.NuGet.Versioning" version="3.2.0" targetFramework="net48" />
<package id="FluentAssertions" version="6.11.0" targetFramework="net48" />
<package id="FluentAssertions.Analyzers" version="0.19.1" targetFramework="net48" developmentDependency="true" />
<package id="log4net" version="2.0.12" targetFramework="net48" />
<package id="Microsoft.CSharp" version="4.3.0" targetFramework="net48" />
<package id="Microsoft.Web.Xdt" version="3.1.0" targetFramework="net48" />
<package id="Moq" version="4.2.1402.2112" targetFramework="net40" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
<package id="NUnit" version="3.13.3" targetFramework="net48" />
<package id="NUnit3TestAdapter" version="4.4.2" targetFramework="net48" />
<package id="Should" version="1.1.20" targetFramework="net48" />
<package id="SimpleInjector" version="2.8.3" targetFramework="net48" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.3" targetFramework="net48" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net48" />
</packages>

0 comments on commit 3bdeb93

Please sign in to comment.