16 references to IfNullOrEmpty
Shared.Tests (16)
Throw\ThrowTest.cs (16)
334ArgumentException exception = Assert.Throws<ArgumentNullException>(() => Throw.IfNullOrEmpty((ICollection<int>?)null, "foo")); 337exception = Assert.Throws<ArgumentNullException>(() => Throw.IfNullOrEmpty((IReadOnlyCollection<int>?)null, "foo")); 340exception = Assert.Throws<ArgumentNullException>(() => Throw.IfNullOrEmpty((List<int>?)null, "foo")); 343exception = Assert.Throws<ArgumentNullException>(() => Throw.IfNullOrEmpty((Queue<int>?)null, "foo")); 346exception = Assert.Throws<ArgumentNullException>(() => Throw.IfNullOrEmpty((IEnumerable<int>?)null, "foo")); 351exception = Assert.Throws<ArgumentException>(() => Throw.IfNullOrEmpty((ICollection<int>?)list, "foo")); 355exception = Assert.Throws<ArgumentException>(() => Throw.IfNullOrEmpty((IReadOnlyCollection<int>?)list, "foo")); 359exception = Assert.Throws<ArgumentException>(() => Throw.IfNullOrEmpty(list, "foo")); 365exception = Assert.Throws<ArgumentException>(() => Throw.IfNullOrEmpty(queue, "foo")); 371exception = Assert.Throws<ArgumentException>(() => Throw.IfNullOrEmpty(enumerable, "foo")); 376Assert.Equal(list, Throw.IfNullOrEmpty((ICollection<int>?)list, "foo")); 377Assert.Equal(list, Throw.IfNullOrEmpty((IReadOnlyCollection<int>?)list, "foo")); 378Assert.Equal(list, Throw.IfNullOrEmpty(list, "foo")); 381Assert.Equal(queue, Throw.IfNullOrEmpty(queue, "foo")); 384Assert.Equal(enumerable, Throw.IfNullOrEmpty(enumerable, "foo")); 392var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfNullOrEmpty(listButActuallyNull!));