public void When_calling_QueryAsync_with_null_repository_Then_ArgumentNullException_is_thrown() { Assert.Multiple(() => { Assert.That(() => RepositoryExtensions.QueryAsync((IRepository <Foo>)null, q => q), Throws.InstanceOf <ArgumentNullException>()); Assert.That(() => RepositoryExtensions.QueryAsync((IRepository <Foo>)null, q => q, _fixture.CreateMany <string>()), Throws.InstanceOf <ArgumentNullException>()); }); }