public void When_DisposeProduct_then_DisposeThisProduct() { ProductToDispose Product = ProductToDispose.Free(AnyGuid()); bool result = Product.Utilize(); Assert.That(result, Is.True); Assert.That(Product.Disposed(), Is.True); }
public void When_TryDisposeUseddProductAlready_then_CantDisposeThisProduct() { ProductToDispose Product = ProductToDispose.Used(AnyGuid()); bool result = Product.Utilize(); Assert.That(result, Is.False); Assert.That(Product.Disposed(), Is.False); }