Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add TagFirstLastWithSourceSequenceOfZero test
Browse files Browse the repository at this point in the history
Orace committed Jan 16, 2023
1 parent f8dc833 commit f5ffb04
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions MoreLinq.Test/TagFirstLastTest.cs
Original file line number Diff line number Diff line change
@@ -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<object>().TagFirstLast(BreakingFunc.Of<object, bool, bool, object>());
}

[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()
{

0 comments on commit f5ffb04

Please sign in to comment.