fix: Fixes tests to use C# 11 syntax (#1462)

This commit is contained in:
Kamron Batman 2023-08-17 00:58:44 -07:00 committed by GitHub
parent 2c8d54549c
commit 35b7c35167
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 37 additions and 13 deletions

View file

@ -4,7 +4,7 @@
<Configurations>Debug;Release;Analyze</Configurations>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.1" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0" />
<ProjectReference Include="..\Server\Server.csproj" />

View file

@ -7,10 +7,16 @@ namespace Server.Tests;
public sealed class PooledRefQueueTests : IDisposable
{
private class MockedRandomSource(int queueCount, int mockedValue) : IRandomSource
private class MockedRandomSource : IRandomSource
{
private int _queueCount = queueCount;
private int _mockedValue = mockedValue;
private int _queueCount;
private int _mockedValue;
public MockedRandomSource(int queueCount, int mockedValue)
{
_queueCount = queueCount;
_mockedValue = mockedValue;
}
public int Next() => throw new NotImplementedException();