Skip to content

Commit

Permalink
Test project
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCiliaVincenti committed Nov 24, 2024
1 parent c784318 commit 03964b8
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
<ItemGroup>
<PackageVersion Include="Backport.System.Threading.Lock" Version="3.0.1" />
<PackageVersion Include="BenchmarkDotNet" Version="0.14.0" />
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
<PackageVersion Include="DotNet.ReproducibleBuilds" Version="1.2.25" />
<PackageVersion Include="FluentAssertions" Version="6.12.2" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageVersion Include="NonBlocking" Version="2.1.2" />
<PackageVersion Include="System.Collections.Immutable" Version="$(SystemCollectionsImmutableVersion)" />
<PackageVersion Include="xunit" Version="2.9.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
</ItemGroup>
</Project>
13 changes: 13 additions & 0 deletions ReadHeavyCollections.Tests/DictionaryTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using Xunit;

namespace ReadHeavyCollections.Tests;

public class DictionaryTests
{
[Fact]
public void ReadTest()
{
ReadHeavyDictionary<int, int> readHeavyDictionary = new() { [0] = 1 };
Assert.Equal(1, readHeavyDictionary[0]);
}
}
38 changes: 38 additions & 0 deletions ReadHeavyCollections.Tests/ReadHeavyCollections.Tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<SignAssembly>True</SignAssembly>
<IsTestProject>true</IsTestProject>
<AssemblyOriginatorKeyFile>ReadHeavyCollections.Tests.snk</AssemblyOriginatorKeyFile>
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\ReadHeavyCollections\ReadHeavyCollections.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="xunit.runner.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
Binary file not shown.
6 changes: 6 additions & 0 deletions ReadHeavyCollections.sln
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Versions.props = Versions.props
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReadHeavyCollections.Tests", "ReadHeavyCollections.Tests\ReadHeavyCollections.Tests.csproj", "{905B3C29-CCEC-495F-BC0D-280B9AA5B039}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -27,6 +29,10 @@ Global
{A89BD705-2733-4CB3-A03F-84A15D8BE655}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A89BD705-2733-4CB3-A03F-84A15D8BE655}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A89BD705-2733-4CB3-A03F-84A15D8BE655}.Release|Any CPU.Build.0 = Release|Any CPU
{905B3C29-CCEC-495F-BC0D-280B9AA5B039}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{905B3C29-CCEC-495F-BC0D-280B9AA5B039}.Debug|Any CPU.Build.0 = Debug|Any CPU
{905B3C29-CCEC-495F-BC0D-280B9AA5B039}.Release|Any CPU.ActiveCfg = Release|Any CPU
{905B3C29-CCEC-495F-BC0D-280B9AA5B039}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down

0 comments on commit 03964b8

Please sign in to comment.