public void DisallowDeletion_WhenCalled_AssertDeletableIsFalse() { IDeletable sut = CreateSut(); sut.DisallowDeletion(); Assert.That(sut.Deletable, Is.False); }
public static void SetDeletable(this IDeletable deletable, bool canDelete) { NullGuard.NotNull(deletable, nameof(deletable)); if (canDelete) { deletable.AllowDeletion(); return; } deletable.DisallowDeletion(); }