public void End_Disposed_ThrowsObjectDisposedException() { var era = new Era(); era.Dispose(); Assert.Throws <ObjectDisposedException>(() => era.End()); }
public void TryEnd_Disposed_ReturnsFalse() { var era = new Era(); era.Dispose(); Assert.That(!era.TryEnd()); }
public void WaitAsync_Disposed_ReturnsFaultedTask() { var era = new Era(); era.Dispose(); TaskAssert.Faulted <ObjectDisposedException>(era.WaitAsync()); }
/// <inheritdoc /> protected override void Dispose(bool ADisposing) { if (ADisposing) { FCurrent.Dispose(); } base.Dispose(ADisposing); }
public void Dispose_FaultsAwaiters() { var era = new Era(); var awaiter = era.WaitAsync(); era.Dispose(); TaskAssert.Faulted <ObjectDisposedException>(awaiter); }