From f5ffb0497b082090359ce8e989557e82281daccc Mon Sep 17 00:00:00 2001 From: Orace Date: Mon, 16 Jan 2023 12:33:48 +0100 Subject: [PATCH] Add TagFirstLastWithSourceSequenceOfZero test --- MoreLinq.Test/TagFirstLastTest.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) 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() {