Created
March 16, 2012 15:28
-
-
Save johnnonolan/2050540 to your computer and use it in GitHub Desktop.
look ma no null reference exceptions!
This file contains hidden or 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
public class When_blah | |
{ | |
static string s; | |
Establish that = () => s = null; | |
Because of = () => s= s.MyExt(); | |
It should_be_null = () => s.ShouldBeNull(); | |
} | |
public static class MyExts | |
{ | |
public static string MyExt(this string s) | |
{ | |
return s; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment