Created
July 28, 2014 12:14
-
-
Save JohanLarsson/aee41becd0d591c290fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Xunit; | |
public class Tests | |
{ | |
[Fact] | |
public void Meh() | |
{ | |
int i = 0; | |
foreach (var item in new Collection()) | |
{ | |
Console.WriteLine(item); | |
i++; | |
if (i > 3) | |
{ | |
break; | |
} | |
} | |
} | |
} | |
public class Collection | |
{ | |
public Enumerator GetEnumerator() | |
{ | |
return new Enumerator(); | |
} | |
} | |
public class Enumerator | |
{ | |
public bool MoveNext() | |
{ | |
return true; | |
} | |
public object Current { get { return 4; } } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment