Assert.Catch Метод
Определение
Важно!
Некоторые сведения относятся к предварительной версии продукта, в которую до выпуска могут быть внесены существенные изменения. Майкрософт не предоставляет никаких гарантий, явных или подразумеваемых, относительно приведенных здесь сведений.
Перегрузки
Catch(Type, TestDelegate, String, Object[])
public static Exception Catch(Type expectedExceptionType, NUnit.Framework.TestDelegate code, string message, params object[] args);
static member Catch : Type * NUnit.Framework.TestDelegate * string * obj[] -> Exception
Параметры
- expectedExceptionType
- Type
- code
- TestDelegate
- message
- String
- args
- Object[]
Возвращаемое значение
Применяется к
Catch(TestDelegate)
public static Exception Catch(NUnit.Framework.TestDelegate code);
static member Catch : NUnit.Framework.TestDelegate -> Exception
Параметры
- code
- TestDelegate
Возвращаемое значение
Применяется к
Catch(TestDelegate, String)
public static Exception Catch(NUnit.Framework.TestDelegate code, string message);
static member Catch : NUnit.Framework.TestDelegate * string -> Exception
Параметры
- code
- TestDelegate
- message
- String
Возвращаемое значение
Применяется к
Catch(Type, TestDelegate)
public static Exception Catch(Type expectedExceptionType, NUnit.Framework.TestDelegate code);
static member Catch : Type * NUnit.Framework.TestDelegate -> Exception
Параметры
- expectedExceptionType
- Type
- code
- TestDelegate
Возвращаемое значение
Применяется к
Catch(TestDelegate, String, Object[])
public static Exception Catch(NUnit.Framework.TestDelegate code, string message, params object[] args);
static member Catch : NUnit.Framework.TestDelegate * string * obj[] -> Exception
Параметры
- code
- TestDelegate
- message
- String
- args
- Object[]
Возвращаемое значение
Применяется к
Catch(Type, TestDelegate, String)
public static Exception Catch(Type expectedExceptionType, NUnit.Framework.TestDelegate code, string message);
static member Catch : Type * NUnit.Framework.TestDelegate * string -> Exception
Параметры
- expectedExceptionType
- Type
- code
- TestDelegate
- message
- String
Возвращаемое значение
Применяется к
Catch<T>(TestDelegate, String)
public static T Catch<T>(NUnit.Framework.TestDelegate code, string message) where T : Exception;
static member Catch : NUnit.Framework.TestDelegate * string -> 'T (requires 'T :> Exception)
Параметры типа
- T
Параметры
- code
- TestDelegate
- message
- String
Возвращаемое значение
T
Применяется к
Catch<T>(TestDelegate, String, Object[])
public static T Catch<T>(NUnit.Framework.TestDelegate code, string message, params object[] args) where T : Exception;
static member Catch : NUnit.Framework.TestDelegate * string * obj[] -> 'T (requires 'T :> Exception)
Параметры типа
- T
Параметры
- code
- TestDelegate
- message
- String
- args
- Object[]
Возвращаемое значение
T
Применяется к
Catch<T>(TestDelegate)
public static T Catch<T>(NUnit.Framework.TestDelegate code) where T : Exception;
static member Catch : NUnit.Framework.TestDelegate -> 'T (requires 'T :> Exception)
Параметры типа
- T
Параметры
- code
- TestDelegate
Возвращаемое значение
T