Here are the examples of the csharp api class NUnit.Framework.Assert.Throws(NUnit.Framework.Constraints.IResolveConstraint, NUnit.Framework.TestDelegate, string, params object[]) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
96 Examples
0
1. Example
View licensepublic static Exception Throws(IResolveConstraint expression, TestDelegate code, string message) { return Throws(expression, code, message, null); }
0
2. Example
View licensepublic static Exception Throws(IResolveConstraint expression, TestDelegate code) { return Throws(expression, code, string.Empty, null); }
0
3. Example
View licensepublic static Exception Throws(Type expectedExceptionType, TestDelegate code, string message, params object[] args) { return Throws(new ExactTypeConstraint(expectedExceptionType), code, message, args); }
0
4. Example
View licensepublic static Exception Throws(Type expectedExceptionType, TestDelegate code, string message) { return Throws(new ExactTypeConstraint(expectedExceptionType), code, message, null); }
0
5. Example
View licensepublic static Exception Throws(Type expectedExceptionType, TestDelegate code) { return Throws(new ExactTypeConstraint(expectedExceptionType), code, string.Empty, null); }
0
6. Example
View licensepublic static Exception Catch(TestDelegate code, string message, params object[] args) { return Throws(new InstanceOfTypeConstraint(typeof(Exception)), code, message, args); }
0
7. Example
View licensepublic static Exception Catch(Type expectedExceptionType, TestDelegate code, string message, params object[] args) { return Throws(new InstanceOfTypeConstraint(expectedExceptionType), code, message, args); }
0
8. Example
View licensepublic static Exception Throws(IResolveConstraint expression, TestDelegate code, string message) { return Throws(expression, code, message, null); }
0
9. Example
View licensepublic static Exception Throws(IResolveConstraint expression, TestDelegate code) { return Throws(expression, code, string.Empty, null); }
0
10. Example
View licensepublic static Exception Throws(Type expectedExceptionType, TestDelegate code, string message, params object[] args) { return Throws(new ExactTypeConstraint(expectedExceptionType), code, message, args); }
0
11. Example
View licensepublic static Exception Throws(Type expectedExceptionType, TestDelegate code, string message) { return Throws(new ExactTypeConstraint(expectedExceptionType), code, message, null); }
0
12. Example
View licensepublic static Exception Throws(Type expectedExceptionType, TestDelegate code) { return Throws(new ExactTypeConstraint(expectedExceptionType), code, string.Empty, null); }
0
13. Example
View licensepublic static Exception Catch(TestDelegate code, string message, params object[] args) { return Throws(new InstanceOfTypeConstraint(typeof(Exception)), code, message, args); }
0
14. Example
View licensepublic static Exception Catch(Type expectedExceptionType, TestDelegate code, string message, params object[] args) { return Throws(new InstanceOfTypeConstraint(expectedExceptionType), code, message, args); }
0
15. Example
View licensepublic static Exception Throws(IResolveConstraint expression, TestDelegate code, string message) { return Throws(expression, code, message, null); }
0
16. Example
View licensepublic static Exception Throws(IResolveConstraint expression, TestDelegate code) { return Throws(expression, code, string.Empty, null); }
0
17. Example
View licensepublic static Exception Throws(Type expectedExceptionType, TestDelegate code, string message, params object[] args) { return Throws(new ExceptionTypeConstraint(expectedExceptionType), code, message, args); }
0
18. Example
View licensepublic static Exception Throws(Type expectedExceptionType, TestDelegate code, string message) { return Throws(new ExceptionTypeConstraint(expectedExceptionType), code, message, null); }
0
19. Example
View licensepublic static Exception Throws(Type expectedExceptionType, TestDelegate code) { return Throws(new ExceptionTypeConstraint(expectedExceptionType), code, string.Empty, null); }
0
20. Example
View licensepublic static Exception Catch(TestDelegate code, string message, params object[] args) { return Throws(new InstanceOfTypeConstraint(typeof(Exception)), code, message, args); }
0
21. Example
View licensepublic static Exception Catch(Type expectedExceptionType, TestDelegate code, string message, params object[] args) { return Throws(new InstanceOfTypeConstraint(expectedExceptionType), code, message, args); }
0
22. Example
View licensepublic static Exception Throws(IResolveConstraint expression, TestDelegate code, string message) { return Throws(expression, code, message, null); }
0
23. Example
View licensepublic static Exception Throws(IResolveConstraint expression, TestDelegate code) { return Throws(expression, code, string.Empty, null); }
0
24. Example
View licensepublic static Exception Throws(Type expectedExceptionType, TestDelegate code, string message, params object[] args) { return Throws(new ExactTypeConstraint(expectedExceptionType), code, message, args); }
0
25. Example
View licensepublic static Exception Throws(Type expectedExceptionType, TestDelegate code, string message) { return Throws(new ExactTypeConstraint(expectedExceptionType), code, message, null); }
0
26. Example
View licensepublic static Exception Throws(Type expectedExceptionType, TestDelegate code) { return Throws(new ExactTypeConstraint(expectedExceptionType), code, string.Empty, null); }
0
27. Example
View licensepublic static Exception Catch(TestDelegate code, string message, params object[] args) { return Throws(new InstanceOfTypeConstraint(typeof(Exception)), code, message, args); }
0
28. Example
View licensepublic static Exception Catch(Type expectedExceptionType, TestDelegate code, string message, params object[] args) { return Throws(new InstanceOfTypeConstraint(expectedExceptionType), code, message, args); }
0
29. Example
View licensepublic static Exception Throws(IResolveConstraint expression, TestDelegate code, string message) { return Throws(expression, code, message, null); }
0
30. Example
View licensepublic static Exception Throws(IResolveConstraint expression, TestDelegate code) { return Throws(expression, code, string.Empty, null); }
0
31. Example
View licensepublic static Exception Throws(Type expectedExceptionType, TestDelegate code, string message, params object[] args) { return Throws(new ExactTypeConstraint(expectedExceptionType), code, message, args); }
0
32. Example
View licensepublic static Exception Throws(Type expectedExceptionType, TestDelegate code, string message) { return Throws(new ExactTypeConstraint(expectedExceptionType), code, message, null); }
0
33. Example
View licensepublic static Exception Throws(Type expectedExceptionType, TestDelegate code) { return Throws(new ExactTypeConstraint(expectedExceptionType), code, string.Empty, null); }
0
34. Example
View licensepublic static Exception Catch(TestDelegate code, string message, params object[] args) { return Throws(new InstanceOfTypeConstraint(typeof(Exception)), code, message, args); }
0
35. Example
View licensepublic static Exception Catch(Type expectedExceptionType, TestDelegate code, string message, params object[] args) { return Throws(new InstanceOfTypeConstraint(expectedExceptionType), code, message, args); }
0
36. Example
View licensepublic static Exception Throws(IResolveConstraint expression, TestDelegate code, string message) { return Throws(expression, code, message, null); }
0
37. Example
View licensepublic static Exception Throws(IResolveConstraint expression, TestDelegate code) { return Throws(expression, code, string.Empty, null); }
0
38. Example
View licensepublic static Exception Throws(Type expectedExceptionType, TestDelegate code, string message, params object[] args) { return Throws(new ExceptionTypeConstraint(expectedExceptionType), code, message, args); }
0
39. Example
View licensepublic static Exception Throws(Type expectedExceptionType, TestDelegate code, string message) { return Throws(new ExceptionTypeConstraint(expectedExceptionType), code, message, null); }
0
40. Example
View licensepublic static Exception Throws(Type expectedExceptionType, TestDelegate code) { return Throws(new ExceptionTypeConstraint(expectedExceptionType), code, string.Empty, null); }
0
41. Example
View licensepublic static Exception Catch(TestDelegate code, string message, params object[] args) { return Throws(new InstanceOfTypeConstraint(typeof(Exception)), code, message, args); }
0
42. Example
View licensepublic static Exception Catch(Type expectedExceptionType, TestDelegate code, string message, params object[] args) { return Throws(new InstanceOfTypeConstraint(expectedExceptionType), code, message, args); }
0
43. Example
View licensepublic static Exception Throws(IResolveConstraint expression, TestDelegate code) { return Throws(expression, code, string.Empty, null); }
0
44. Example
View licensepublic static Exception Throws(Type expectedExceptionType, TestDelegate code, string message, params object[] args) { return Throws(new ExceptionTypeConstraint(expectedExceptionType), code, message, args); }
0
45. Example
View licensepublic static Exception Throws(Type expectedExceptionType, TestDelegate code) { return Throws(new ExceptionTypeConstraint(expectedExceptionType), code, string.Empty, null); }
0
46. Example
View licensepublic static Exception Catch(TestDelegate code, string message, params object[] args) { return Throws(new InstanceOfTypeConstraint(typeof(Exception)), code, message, args); }
0
47. Example
View licensepublic static Exception Catch(Type expectedExceptionType, TestDelegate code, string message, params object[] args) { return Throws(new InstanceOfTypeConstraint(expectedExceptionType), code, message, args); }
0
48. Example
View licensepublic static TActual Catch<TActual>(TestDelegate code, string message, params object[] args) where TActual : System.Exception { return (TActual)Throws(new InstanceOfTypeConstraint(typeof(TActual)), code, message, args); }
0
49. Example
View licensepublic static Exception Throws(IResolveConstraint expression, TestDelegate code, string message) { return Throws(expression, code, message, null); }
0
50. Example
View licensepublic static Exception Throws(IResolveConstraint expression, TestDelegate code) { return Throws(expression, code, string.Empty, null); }