public GetDepth ( |
||
exceptionType |
/// The |
|
Результат | int |
public void AlwaysTrue() { RollbackRuleAttribute rr = new RollbackRuleAttribute("System.Exception"); Assert.IsTrue(rr.GetDepth(typeof (SystemException)) > 0); Assert.IsTrue(rr.GetDepth(typeof (ApplicationException)) > 0); Assert.IsTrue(rr.GetDepth(typeof (DataException)) > 0); Assert.IsTrue(rr.GetDepth(typeof (TransactionSystemException)) > 0); }
public void AlwaysTrue() { RollbackRuleAttribute rr = new RollbackRuleAttribute("System.Exception"); Assert.IsTrue(rr.GetDepth(typeof(SystemException)) > 0); Assert.IsTrue(rr.GetDepth(typeof(ApplicationException)) > 0); Assert.IsTrue(rr.GetDepth(typeof(DataException)) > 0); Assert.IsTrue(rr.GetDepth(typeof(TransactionSystemException)) > 0); }
public void Ancestry() { RollbackRuleAttribute rr = new RollbackRuleAttribute("System.Exception"); Assert.IsTrue(rr.GetDepth(typeof (DataException)) == 2); }
public void NotFound() { RollbackRuleAttribute rr = new RollbackRuleAttribute("System.Data.DataException"); Assert.IsTrue(rr.GetDepth(typeof (ApplicationException)) == -1); }
public void FoundImmediatelyWithType() { RollbackRuleAttribute rr = new RollbackRuleAttribute(typeof (Exception)); Assert.IsTrue(rr.GetDepth(typeof (Exception)) == 0); }
public void Ancestry() { RollbackRuleAttribute rr = new RollbackRuleAttribute("System.Exception"); Assert.IsTrue(rr.GetDepth(typeof(DataException)) == 2); }
public void NotFound() { RollbackRuleAttribute rr = new RollbackRuleAttribute("System.Data.DataException"); Assert.IsTrue(rr.GetDepth(typeof(ApplicationException)) == -1); }
public void FoundImmediatelyWithType() { RollbackRuleAttribute rr = new RollbackRuleAttribute(typeof(Exception)); Assert.IsTrue(rr.GetDepth(typeof(Exception)) == 0); }