我有这个方法:
public static IEnumerable<T> Jumping<T>( this IEnumerable<T> sequence, int step)
{
if(sequence==null)
throw new ArgumentNullException();
if(step<0)
throw new ArgumentOutOfRangeException();
var s = sequence.GetEnumerator();
for (int i = 0; i <= step; i++)
{
if (!s.MoveNext())
{
s.Reset();
s.MoveNext();
}
if (i == step)
{
i = 0;
yield return s.Current;
}
}
}
请求是创建一个无限序列的NUnit测试,我该怎么做?