예제 #1
0
        private static void TestException(testExceptionMethodCallback dlg, IList exceptionList)
        {
            Exception ex = Assert.ThrowsAny <Exception>(() => dlg());

            foreach (Exception expectedEx in exceptionList)
            {
                if ((expectedEx.GetType()) == (ex.GetType()))
                {
                    return;
                }
            }
            Assert.True(false);
        }
예제 #2
0
 public void TestException(testExceptionMethodCallback dlg, IList exceptionList)
 {
     try {
         dlg();
         Assert.Fail("ccac#A", ((Exception)exceptionList[0]).ToString());
     }
     catch (Exception ex) {
         foreach (Exception expectedEx in exceptionList)
         {
             if ((expectedEx.GetType()) == (ex.GetType()))
             {
                 return;
             }
         }
         Assert.Fail("ccac#B");
     }
 }
예제 #3
0
 public void TestException(testExceptionMethodCallback dlg, IList exceptionList)
 {
     Exception ex = Assert.ThrowsAny<Exception>(() => dlg());
     foreach (Exception expectedEx in exceptionList)
         if ((expectedEx.GetType()) == (ex.GetType()))
             return;
     Assert.True(false);
 }
		public void TestException(testExceptionMethodCallback dlg,IList exceptionList)
		{				
			try {
				dlg();
				Assert.Fail("ccac#A", ((Exception)exceptionList[0]).ToString()); 
			}
			catch(Exception ex) {					
				foreach(Exception expectedEx in exceptionList)
					if ( (expectedEx.GetType()) == (ex.GetType()) )
						return;				
				Assert.Fail("ccac#B");
			}		
		}