Skip to content

Instantly share code, notes, and snippets.

@plioi
Created August 8, 2013 02:27
Show Gist options
  • Save plioi/6180921 to your computer and use it in GitHub Desktop.
Save plioi/6180921 to your computer and use it in GitHub Desktop.
class SampleTestClass : IDisposable
{
bool disposed;
public SampleTestClass()
{
WhereAmI();
}
public void Pass()
{
WhereAmI();
}
public void Fail()
{
WhereAmI();
throw new FailureException();
}
public void Dispose()
{
if (disposed)
throw new ShouldBeUnreachableException();
disposed = true;
WhereAmI();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment