[TestFixture]
public class TransactionScopeTest
{
+
+ [Test]
+ public void TransactionScopeWithInvalidTimeSpanThrows ()
+ {
+ try {
+ TransactionScope scope = new TransactionScope (TransactionScopeOption.Required, TimeSpan.FromSeconds (-1));
+ Assert.Fail ("Expected exception when passing TransactionScopeOption and an invalid TimeSpan.");
+ } catch (ArgumentOutOfRangeException ex) {
+ Assert.AreEqual ("scopeTimeout", ex.ParamName);
+ }
+
+ try {
+ TransactionScope scope = new TransactionScope (null, TimeSpan.FromSeconds (-1));
+ Assert.Fail ("Expected exception when passing TransactionScopeOption and an invalid TimeSpan.");
+ } catch (ArgumentOutOfRangeException ex) {
+ Assert.AreEqual ("scopeTimeout", ex.ParamName);
+ }
+ }
+
[Test]
public void TransactionScopeCommit ()
{
}
[Test]
- [Category("NotWorking")]
- [Ignore("NotWorking")]
public void RMFail2 ()
{
IntResourceManager irm = new IntResourceManager (1);