本文整理汇总了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());
}