Пример #1
0
        public void AllowDeletion_WhenCalled_AssertDeletableIsTrue()
        {
            IDeletable sut = CreateSut();

            sut.AllowDeletion();

            Assert.That(sut.Deletable, Is.True);
        }
Пример #2
0
        public static void SetDeletable(this IDeletable deletable, bool canDelete)
        {
            NullGuard.NotNull(deletable, nameof(deletable));

            if (canDelete)
            {
                deletable.AllowDeletion();
                return;
            }

            deletable.DisallowDeletion();
        }