using System.Collections.Generic; using System.Threading.Tasks; using Octokit.Internal; using NSubstitute; using Xunit; namespace Octokit.Tests.Http { public class ReadOnlyPagedCollectionTests { public class TheConstructor { [Fact] public void AcceptsAResponseWithANullBody() { var response = Substitute.For>>(); response.Body.Returns((List)null); var exception = Record.Exception(() => new ReadOnlyPagedCollection(response, uri => Task.FromResult(response))); Assert.Null(exception); } } } }