本文整理匯總了C#中Spring.Transaction.Support.TransactionTemplate.AfterPropertiesSet方法的典型用法代碼示例。如果您正苦於以下問題:C# TransactionTemplate.AfterPropertiesSet方法的具體用法?C# TransactionTemplate.AfterPropertiesSet怎麽用?C# TransactionTemplate.AfterPropertiesSet使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Spring.Transaction.Support.TransactionTemplate
的用法示例。
在下文中一共展示了TransactionTemplate.AfterPropertiesSet方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: NullResult
public void NullResult()
{
MockTxnPlatformMgr mock = new MockTxnPlatformMgr();
mock.SetExpectedGetTxnCallCount(1);
mock.SetExpectedCommitCallCount(1);
TransactionTemplate temp = new TransactionTemplate(mock);
temp.AfterPropertiesSet();
Assert.AreEqual( mock, temp.PlatformTransactionManager);
Assert.IsNull( temp.Execute(new TransactionDelegate(DummyTransactionMethod) ) );
mock.Verify();
}
示例2: NullResult
public void NullResult()
{
IPlatformTransactionManager mock = MockRepository.GenerateMock<IPlatformTransactionManager>();
TransactionTemplate temp = new TransactionTemplate(mock);
temp.AfterPropertiesSet();
Assert.AreEqual(mock, temp.PlatformTransactionManager);
Assert.IsNull(temp.Execute(new TransactionDelegate(DummyTransactionMethod)));
mock.AssertWasCalled(x => x.GetTransaction(Arg<ITransactionDefinition>.Is.Anything), constraints => constraints.Repeat.Once());
mock.AssertWasCalled(x => x.Commit(Arg<ITransactionStatus>.Is.Anything), constraints => constraints.Repeat.Once());
}
示例3: TxnMgr
public void TxnMgr()
{
TransactionTemplate temp = new TransactionTemplate();
temp.PlatformTransactionManager = new MockTxnPlatformMgr();
temp.AfterPropertiesSet();
}
示例4: NoTxnMgr
public void NoTxnMgr()
{
TransactionTemplate temp = new TransactionTemplate();
temp.AfterPropertiesSet();
}
示例5: TxnMgr
public void TxnMgr()
{
TransactionTemplate temp = new TransactionTemplate();
temp.PlatformTransactionManager = MockRepository.GenerateMock<IPlatformTransactionManager>();
temp.AfterPropertiesSet();
}
示例6: NoTxnMgr
public void NoTxnMgr()
{
TransactionTemplate temp = new TransactionTemplate();
Assert.Throws<ArgumentException>(() => temp.AfterPropertiesSet());
}