enable nullable reference types in Agent tests

This commit is contained in:
Collin M. Barrett 2019-07-05 14:24:53 -05:00
parent d94d23feba
commit 6a70c4f44c
2 changed files with 4 additions and 10 deletions

View file

@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using FilterLists.Agent.Extensions;
using Xunit;
@ -7,13 +6,6 @@ namespace FilterLists.Agent.Tests.Extensions
{
public class ReadOnlyListExtensionsTests
{
[Fact]
public void FirstOrDefault_WithNullParameter_ThrowsArgumentNullException()
{
var list = (IReadOnlyList<int>)null;
Assert.Throws<ArgumentNullException>(() => list.FirstOrDefault());
}
[Fact]
public void FirstOrDefault_WithEmptyList_ReturnsDefault()
{

View file

@ -3,7 +3,9 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<LangVersion>latest</LangVersion>
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
<NullableContextOptions>enable</NullableContextOptions>
<Authors>Collin M. Barrett</Authors>
<Company>Collin M. Barrett</Company>
<Product>FilterLists</Product>