public void FailureTest()
{
using (var disposable = new Disposable())
{
ScopeGuard<Disposable> disposableGuard = ScopeGuard.Create(disposable);
disposableGuard.Dispose();
Assert.IsTrue(disposable.DisposeCalled);
AssertThrow<ObjectDisposedException>(delegate { disposableGuard.Resource.Ignore(); });
disposableGuard.Dispose();
AssertThrow<ObjectDisposedException>(delegate { disposableGuard.Resource.Ignore(); });
AssertThrow<ObjectDisposedException>(delegate { disposableGuard.Dismiss(); });
}
}