DeleteBusinessObject() публичный Метод

Deletes the given business object
public DeleteBusinessObject ( IBusinessObject businessObject ) : void
businessObject IBusinessObject The business object to delete
Результат void
        public void Test_DeleteBusinessObject_ConfirmedIsFalse_ShouldNotDeleteBO()
        {
            //---------------Set up test pack-------------------

            var confirmer = new ConfirmerFake(false);
            var boToDelete = MockRepository.GenerateStub<IBusinessObject>();
            var confirmingBusinessObjectDeletor = new ConfirmingBusinessObjectDeletor(confirmer);
            //---------------Assert Precondition----------------
            Assert.IsFalse(confirmer.WillBeConfirmed);
            //---------------Execute Test ----------------------
            confirmingBusinessObjectDeletor.DeleteBusinessObject(boToDelete);
            //---------------Test Result -----------------------
            boToDelete.AssertWasNotCalled(o => o.MarkForDelete());
        }
 public void Test_DeleteBusinessObject_ConfirmationMessage()
 {
     //---------------Set up test pack-------------------
     MockRepository mockRepository = new MockRepository();
     string boToString = TestUtil.GetRandomString();
     string expectedMessage = string.Format("Are you certain you want to delete the object '{0}'", boToString);
     IConfirmer confirmer = CreateMockConfirmerWithExpectation(mockRepository, 
         Is.Equal(expectedMessage), false);
     IBusinessObject boToDelete = new MockBOWithToString(boToString);
     ConfirmingBusinessObjectDeletor confirmingBusinessObjectDeletor = new ConfirmingBusinessObjectDeletor(confirmer);
     mockRepository.ReplayAll();
     //---------------Assert Precondition----------------
     //---------------Execute Test ----------------------
     confirmingBusinessObjectDeletor.DeleteBusinessObject(boToDelete);
     //---------------Test Result -----------------------
     mockRepository.VerifyAll();
 }
 public void Test_DeleteBusinessObject_CustomConfirmationMessage()
 {
     //---------------Set up test pack-------------------
     MockRepository mockRepository = new MockRepository();
     string expectedMessage = TestUtil.GetRandomString();
     IConfirmer confirmer = CreateMockConfirmerWithExpectation(mockRepository, 
         Is.Equal(expectedMessage), false);
     IBusinessObject boToDelete = mockRepository.StrictMock<IBusinessObject>();
     ConfirmingBusinessObjectDeletor confirmingBusinessObjectDeletor = 
         new ConfirmingBusinessObjectDeletor(confirmer, t => expectedMessage);
     mockRepository.ReplayAll();
     //---------------Assert Precondition----------------
     //---------------Execute Test ----------------------
     confirmingBusinessObjectDeletor.DeleteBusinessObject(boToDelete);
     //---------------Test Result -----------------------
     mockRepository.VerifyAll();
 }