public void OnExecutionFail() { InvokeTransactionStrategyPlay(); Exception exception = new Exception(); _transactionStrategyMock.OnExecutionFail(_wxeContext, _innerListenerMock, exception); _transactionListener.OnExecutionStop(_wxeContext); _transactionStrategyMock.AssertWasCalled(mock => mock.OnExecutionFail(_wxeContext, _innerListenerMock, exception)); _innerListenerMock.AssertWasNotCalled(mock => mock.OnExecutionFail(_wxeContext, exception)); }
public void OnExecutionFail() { _childTransactionMock.Stub(stub => stub.EnterScope()).Return(MockRepository.GenerateStub <ITransactionScope> ()); _mockRepository.ReplayAll(); _strategy.OnExecutionPlay(_context, _executionListenerStub); _childTransactionMock.BackToRecord(); using (_mockRepository.Ordered()) { _childTransactionMock.Expect(mock => mock.Release()); _outerTransactionStrategyMock.Expect(mock => mock.UnregisterChildTransactionStrategy(_strategy)); } _mockRepository.ReplayAll(); _strategy.OnExecutionFail(_context, _executionListenerStub, new Exception("Inner Exception")); _mockRepository.VerifyAll(); }