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: nunit
Source File: Assert.Exceptions.cs
View license
public static Exception Throws(IResolveConstraint expression, TestDelegate code)
        {
            return Throws(expression, code, string.Empty, null);
        }

2. Example

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

3. Example

Project: AutoTest.Net
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: AutoTest.Net
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);
        }

5. Example

Project: AutoTest.Net
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);
        }

6. Example

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

7. Example

Project: AutoTest.Net
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);
        }

8. Example

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

9. Example

Project: AutoTest.Net
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: AutoTest.Net
Source File: Assert.cs
View license
public static Exception Throws(Type expectedExceptionType, TestDelegate code, string message)
        {
            return Throws(new ExceptionTypeConstraint(expectedExceptionType), code, message, null);
        }

11. Example

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

12. Example

Project: AutoTest.Net
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);
        }

13. Example

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

14. Example

Project: nunit
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);
        }

15. Example

Project: nunit
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);
        }

16. Example

Project: nunit
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);
        }

17. Example

Project: nunit
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);
        }

18. Example

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

19. Example

Project: nunitlite
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);
        }

20. Example

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

21. Example

Project: nunitlite
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);
        }

22. Example

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

23. Example

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

24. 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);
        }

25. Example

Project: AutoTest.Net
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);
        }

26. Example

Project: AutoTest.Net
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: AutoTest.Net
Source File: Assert.cs
View license
public static Exception Throws(Type expectedExceptionType, TestDelegate code)
        {
            return Throws(new ExactTypeConstraint(expectedExceptionType), code, string.Empty, null);
        }

28. Example

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

29. Example

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

30. Example

Project: AutoTest.Net
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: AutoTest.Net
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);
        }

32. Example

Project: AutoTest.Net
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: AutoTest.Net
Source File: Assert.cs
View license
public static Exception Throws(Type expectedExceptionType, TestDelegate code)
        {
            return Throws(new ExceptionTypeConstraint(expectedExceptionType), code, string.Empty, null);
        }

34. Example

Project: AutoTest.Net
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);
        }

35. Example

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

36. Example

Project: AutoTest.Net
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);
        }

37. Example

Project: nunitlite
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);
        }

38. Example

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

39. Example

Project: AutoTest.Net
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);
        }

40. Example

Project: AutoTest.Net
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);
        }

41. Example

Project: AutoTest.Net
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);
        }

42. Example

Project: AutoTest.Net
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);
        }

43. Example

Project: AutoTest.Net
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);
        }

44. Example

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

45. Example

Project: AutoTest.Net
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);
        }

46. Example

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

47. Example

Project: AutoTest.Net
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);
        }

48. Example

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

49. Example

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

50. 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);
        }