diff --git a/MoreLinq.Test/TagFirstLastTest.cs b/MoreLinq.Test/TagFirstLastTest.cs index b02c45358..3ad57d567 100644 --- a/MoreLinq.Test/TagFirstLastTest.cs +++ b/MoreLinq.Test/TagFirstLastTest.cs @@ -15,6 +15,8 @@ // limitations under the License. #endregion +using System; + namespace MoreLinq.Test { using NUnit.Framework; @@ -37,6 +39,14 @@ public void TagFirstLastIsLazy() new BreakingSequence().TagFirstLast(BreakingFunc.Of()); } + [Test] + public void TagFirstLastWithSourceSequenceOfZero() + { + var source = new int[0]; + var sut = source.TagFirstLast((item, isFirst, isLast) => new { Item = item, IsFirst = isFirst, IsLast = isLast }); + Assert.That(sut, Is.Empty); + } + [Test] public void TagFirstLastWithSourceSequenceOfOne() {