chore: add NUnit Analyzers
This commit is contained in:
parent
1ad8e46ab5
commit
12b2764a03
|
@ -12,6 +12,10 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
|
||||
<PackageReference Include="NUnit" Version="4.1.0" />
|
||||
<PackageReference Include="NUnit.Analyzers" Version="4.2.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
|
|
|
@ -32,6 +32,9 @@ public class NullableExtensionTests
|
|||
[Test]
|
||||
public void TestNullableReferenceOfValueAsMaybe()
|
||||
{
|
||||
// ReSharper disable once SuggestVarOrType_BuiltInTypes
|
||||
// ReSharper disable once ConvertToConstant.Local
|
||||
// ReSharper disable once VariableCanBeNotNullable
|
||||
string? nullableString = "banana";
|
||||
|
||||
var result = nullableString.AsMaybe();
|
||||
|
|
Loading…
Reference in New Issue
Block a user