NUnit.Framework.Assert.Throws(NUnit.Framework.Constraints.IResolveConstraint, NUnit.Framework.TestDelegate, string, params object[])

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 7

1. Example

Project: ContinuousTests
Source File: Assert.cs
View license
public static Exception Throws(IResolveConstraint expression, TestDelegate code, string message)
        {
            return Throws(expression, code, message, null);
        }

2. Example

Project: ContinuousTests
Source File: Assert.cs
View license
public static Exception Throws(IResolveConstraint expression, TestDelegate code)
        {
            return Throws(expression, code, string.Empty, null);
        }

3. Example

Project: ContinuousTests
Source File: Assert.cs
View license
public static Exception Throws(Type expectedExceptionType, TestDelegate code, string message, params object[] args)
        {
            return Throws(new ExactTypeConstraint(expectedExceptionType), code, message, args);
        }

4. Example

Project: ContinuousTests
Source File: Assert.cs
View license
public static Exception Throws(Type expectedExceptionType, TestDelegate code, string message)
        {
            return Throws(new ExactTypeConstraint(expectedExceptionType), code, message, null);
        }

5. Example

Project: ContinuousTests
Source File: Assert.cs
View license
public static Exception Throws(Type expectedExceptionType, TestDelegate code)
        {
            return Throws(new ExactTypeConstraint(expectedExceptionType), code, string.Empty, null);
        }

6. Example

Project: ContinuousTests
Source File: Assert.cs
View license
public static Exception Catch(TestDelegate code, string message, params object[] args)
        {
            return Throws(new InstanceOfTypeConstraint(typeof(Exception)), code, message, args);
        }

7. Example

Project: ContinuousTests
Source File: Assert.cs
View license
public static Exception Catch(Type expectedExceptionType, TestDelegate code, string message, params object[] args)
        {
            return Throws(new InstanceOfTypeConstraint(expectedExceptionType), code, message, args);
        }

8. Example

Project: ContinuousTests
Source File: Assert.template.cs
View license
public static Exception Throws(IResolveConstraint expression, TestDelegate code, string message)
        {
            return Throws(expression, code, message, null);
        }

9. Example

Project: ContinuousTests
Source File: Assert.template.cs
View license
public static Exception Throws(IResolveConstraint expression, TestDelegate code)
        {
            return Throws(expression, code, string.Empty, null);
        }

10. Example

Project: ContinuousTests
Source File: Assert.template.cs
View license
public static Exception Throws(Type expectedExceptionType, TestDelegate code, string message, params object[] args)
        {
            return Throws(new ExactTypeConstraint(expectedExceptionType), code, message, args);
        }

11. Example

Project: ContinuousTests
Source File: Assert.template.cs
View license
public static Exception Throws(Type expectedExceptionType, TestDelegate code, string message)
        {
            return Throws(new ExactTypeConstraint(expectedExceptionType), code, message, null);
        }

12. Example

Project: ContinuousTests
Source File: Assert.template.cs
View license
public static Exception Throws(Type expectedExceptionType, TestDelegate code)
        {
            return Throws(new ExactTypeConstraint(expectedExceptionType), code, string.Empty, null);
        }

13. Example

Project: ContinuousTests
Source File: Assert.template.cs
View license
public static Exception Catch(TestDelegate code, string message, params object[] args)
        {
            return Throws(new InstanceOfTypeConstraint(typeof(Exception)), code, message, args);
        }

14. Example

Project: ContinuousTests
Source File: Assert.template.cs
View license
public static Exception Catch(Type expectedExceptionType, TestDelegate code, string message, params object[] args)
        {
            return Throws(new InstanceOfTypeConstraint(expectedExceptionType), code, message, args);
        }

15. Example

Project: ContinuousTests
Source File: Assert.cs
View license
public static Exception Throws(IResolveConstraint expression, TestDelegate code, string message)
        {
            return Throws(expression, code, message, null);
        }

16. Example

Project: ContinuousTests
Source File: Assert.cs
View license
public static Exception Throws(IResolveConstraint expression, TestDelegate code)
        {
            return Throws(expression, code, string.Empty, null);
        }

17. Example

Project: ContinuousTests
Source File: Assert.cs
View license
public static Exception Throws(Type expectedExceptionType, TestDelegate code, string message, params object[] args)
        {
            return Throws(new ExceptionTypeConstraint(expectedExceptionType), code, message, args);
        }

18. Example

Project: ContinuousTests
Source File: Assert.cs
View license
public static Exception Throws(Type expectedExceptionType, TestDelegate code, string message)
        {
            return Throws(new ExceptionTypeConstraint(expectedExceptionType), code, message, null);
        }

19. Example

Project: ContinuousTests
Source File: Assert.cs
View license
public static Exception Throws(Type expectedExceptionType, TestDelegate code)
        {
            return Throws(new ExceptionTypeConstraint(expectedExceptionType), code, string.Empty, null);
        }

20. Example

Project: ContinuousTests
Source File: Assert.cs
View license
public static Exception Catch(TestDelegate code, string message, params object[] args)
        {
            return Throws(new InstanceOfTypeConstraint(typeof(Exception)), code, message, args);
        }

21. Example

Project: ContinuousTests
Source File: Assert.cs
View license
public static Exception Catch(Type expectedExceptionType, TestDelegate code, string message, params object[] args)
        {
            return Throws(new InstanceOfTypeConstraint(expectedExceptionType), code, message, args);
        }

22. Example

Project: ContinuousTests
Source File: Assert.cs
View license
public static Exception Throws(IResolveConstraint expression, TestDelegate code, string message)
        {
            return Throws(expression, code, message, null);
        }

23. Example

Project: ContinuousTests
Source File: Assert.cs
View license
public static Exception Throws(IResolveConstraint expression, TestDelegate code)
        {
            return Throws(expression, code, string.Empty, null);
        }

24. Example

Project: ContinuousTests
Source File: Assert.cs
View license
public static Exception Throws(Type expectedExceptionType, TestDelegate code, string message, params object[] args)
        {
            return Throws(new ExactTypeConstraint(expectedExceptionType), code, message, args);
        }

25. Example

Project: ContinuousTests
Source File: Assert.cs
View license
public static Exception Throws(Type expectedExceptionType, TestDelegate code, string message)
        {
            return Throws(new ExactTypeConstraint(expectedExceptionType), code, message, null);
        }

26. Example

Project: ContinuousTests
Source File: Assert.cs
View license
public static Exception Throws(Type expectedExceptionType, TestDelegate code)
        {
            return Throws(new ExactTypeConstraint(expectedExceptionType), code, string.Empty, null);
        }

27. Example

Project: ContinuousTests
Source File: Assert.cs
View license
public static Exception Catch(TestDelegate code, string message, params object[] args)
        {
            return Throws(new InstanceOfTypeConstraint(typeof(Exception)), code, message, args);
        }

28. Example

Project: ContinuousTests
Source File: Assert.cs
View license
public static Exception Catch(Type expectedExceptionType, TestDelegate code, string message, params object[] args)
        {
            return Throws(new InstanceOfTypeConstraint(expectedExceptionType), code, message, args);
        }

29. Example

Project: ContinuousTests
Source File: Assert.template.cs
View license
public static Exception Throws(IResolveConstraint expression, TestDelegate code, string message)
        {
            return Throws(expression, code, message, null);
        }

30. Example

Project: ContinuousTests
Source File: Assert.template.cs
View license
public static Exception Throws(IResolveConstraint expression, TestDelegate code)
        {
            return Throws(expression, code, string.Empty, null);
        }

31. Example

Project: ContinuousTests
Source File: Assert.template.cs
View license
public static Exception Throws(Type expectedExceptionType, TestDelegate code, string message, params object[] args)
        {
            return Throws(new ExactTypeConstraint(expectedExceptionType), code, message, args);
        }

32. Example

Project: ContinuousTests
Source File: Assert.template.cs
View license
public static Exception Throws(Type expectedExceptionType, TestDelegate code, string message)
        {
            return Throws(new ExactTypeConstraint(expectedExceptionType), code, message, null);
        }

33. Example

Project: ContinuousTests
Source File: Assert.template.cs
View license
public static Exception Throws(Type expectedExceptionType, TestDelegate code)
        {
            return Throws(new ExactTypeConstraint(expectedExceptionType), code, string.Empty, null);
        }

34. Example

Project: ContinuousTests
Source File: Assert.template.cs
View license
public static Exception Catch(TestDelegate code, string message, params object[] args)
        {
            return Throws(new InstanceOfTypeConstraint(typeof(Exception)), code, message, args);
        }

35. Example

Project: ContinuousTests
Source File: Assert.template.cs
View license
public static Exception Catch(Type expectedExceptionType, TestDelegate code, string message, params object[] args)
        {
            return Throws(new InstanceOfTypeConstraint(expectedExceptionType), code, message, args);
        }

36. Example

Project: msgpack-cli
Source File: Assert.cs
View license
public static Exception Throws(IResolveConstraint expression, TestDelegate code, string message)
        {
            return Throws(expression, code, message, null);
        }

37. Example

Project: msgpack-cli
Source File: Assert.cs
View license
public static Exception Throws(IResolveConstraint expression, TestDelegate code)
        {
            return Throws(expression, code, string.Empty, null);
        }

38. Example

Project: msgpack-cli
Source File: Assert.cs
View license
public static Exception Throws(Type expectedExceptionType, TestDelegate code, string message, params object[] args)
        {
            return Throws(new ExceptionTypeConstraint(expectedExceptionType), code, message, args);
        }

39. Example

Project: msgpack-cli
Source File: Assert.cs
View license
public static Exception Throws(Type expectedExceptionType, TestDelegate code, string message)
        {
            return Throws(new ExceptionTypeConstraint(expectedExceptionType), code, message, null);
        }

40. Example

Project: msgpack-cli
Source File: Assert.cs
View license
public static Exception Throws(Type expectedExceptionType, TestDelegate code)
        {
            return Throws(new ExceptionTypeConstraint(expectedExceptionType), code, string.Empty, null);
        }

41. Example

Project: msgpack-cli
Source File: Assert.cs
View license
public static Exception Catch(TestDelegate code, string message, params object[] args)
        {
            return Throws(new InstanceOfTypeConstraint(typeof(Exception)), code, message, args);
        }

42. Example

Project: msgpack-cli
Source File: Assert.cs
View license
public static Exception Catch(Type expectedExceptionType, TestDelegate code, string message, params object[] args)
        {
            return Throws(new InstanceOfTypeConstraint(expectedExceptionType), code, message, args);
        }

43. Example

Project: msgpack-cli
Source File: Assert.Exceptions.cs
View license
public static Exception Throws(IResolveConstraint expression, TestDelegate code)
        {
            return Throws(expression, code, string.Empty, null);
        }

44. Example

Project: msgpack-cli
Source File: Assert.Exceptions.cs
View license
public static Exception Throws(Type expectedExceptionType, TestDelegate code, string message, params object[] args)
        {
            return Throws(new ExceptionTypeConstraint(expectedExceptionType), code, message, args);
        }

45. Example

Project: msgpack-cli
Source File: Assert.Exceptions.cs
View license
public static Exception Throws(Type expectedExceptionType, TestDelegate code)
        {
            return Throws(new ExceptionTypeConstraint(expectedExceptionType), code, string.Empty, null);
        }

46. Example

Project: msgpack-cli
Source File: Assert.Exceptions.cs
View license
public static Exception Catch(TestDelegate code, string message, params object[] args)
        {
            return Throws(new InstanceOfTypeConstraint(typeof(Exception)), code, message, args);
        }

47. Example

Project: msgpack-cli
Source File: Assert.Exceptions.cs
View license
public static Exception Catch(Type expectedExceptionType, TestDelegate code, string message, params object[] args)
        {
            return Throws(new InstanceOfTypeConstraint(expectedExceptionType), code, message, args);
        }

48. Example

Project: msgpack-cli
Source File: Assert.Exceptions.cs
View license
public 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);
        }

49. Example

Project: nunitlite
Source File: Assert.cs
View license
public static Exception Throws(IResolveConstraint expression, TestDelegate code, string message)
        {
            return Throws(expression, code, message, null);
        }

50. Example

Project: nunitlite
Source File: Assert.cs
View license
public static Exception Throws(IResolveConstraint expression, TestDelegate code)
        {
            return Throws(expression, code, string.Empty, null);
        }