Пример #1
0
        public void FindNotFoundType()
        {
            CriticalUserLevelException criticalUserLevelException = new CriticalUserLevelException();
            UserLevelException         userLevelException         = new UserLevelException(criticalUserLevelException);

            Assert.AreEqual(null, ExceptionUtils.Find <CoreLevelException>(userLevelException));
        }
Пример #2
0
        public void FindByBaseType()
        {
            CriticalUserLevelException criticalUserLevelException = new CriticalUserLevelException();
            UserLevelException         userLevelException         = new UserLevelException(criticalUserLevelException);

            Assert.AreSame(userLevelException, ExceptionUtils.Find <Exception>(userLevelException));
            Assert.AreSame(userLevelException, ExceptionUtils.Find <BaseUserLevelException>(userLevelException));
            Assert.AreSame(criticalUserLevelException, ExceptionUtils.Find <CriticalUserLevelException>(userLevelException));
        }
Пример #3
0
        public void Find()
        {
            CoreLevelException coreLevelException = new CoreLevelException();
            UserLevelException userLevelException = new UserLevelException(coreLevelException);

            CoreLevelException foundCoreLevelException = ExceptionUtils.Find <CoreLevelException>(userLevelException);

            Assert.AreSame(coreLevelException, foundCoreLevelException);
        }