NUnit.Framework.Assert.Throws(NUnit.Framework.Constraints.IResolveConstraint, NUnit.Framework.TestDelegate, string)

Here are the examples of the csharp api class NUnit.Framework.Assert.Throws(NUnit.Framework.Constraints.IResolveConstraint, NUnit.Framework.TestDelegate, string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

26 Examples 7

1. Example

Project: ContinuousTests
Source File: Assert.cs
public static Exception Catch(TestDelegate code, string message)
        {
            return Throws(new InstanceOfTypeConstraint(typeof(Exception)), code, message);
        }

2. Example

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

3. Example

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

4. Example

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

5. Example

Project: ContinuousTests
Source File: Assert.cs
public static Exception Catch(TestDelegate code, string message)
        {
            return Throws(new InstanceOfTypeConstraint(typeof(Exception)), code, message);
        }

6. Example

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

7. Example

Project: ContinuousTests
Source File: Assert.cs
public static Exception Catch(TestDelegate code, string message)
        {
            return Throws(new InstanceOfTypeConstraint(typeof(Exception)), code, message);
        }

8. Example

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

9. Example

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

10. Example

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

11. Example

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

12. Example

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

13. Example

Project: nunitlite
Source File: Assert.cs
public static Exception Catch(TestDelegate code, string message)
        {
            return Throws(new InstanceOfTypeConstraint(typeof(Exception)), code, message);
        }

14. Example

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

15. Example

Project: AutoTest.Net
Source File: Assert.cs
public static Exception Catch(TestDelegate code, string message)
        {
            return Throws(new InstanceOfTypeConstraint(typeof(Exception)), code, message);
        }

16. Example

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

17. Example

Project: AutoTest.Net
Source File: Assert.template.cs
public static Exception Catch(TestDelegate code, string message)
        {
            return Throws(new InstanceOfTypeConstraint(typeof(Exception)), code, message);
        }

18. Example

Project: AutoTest.Net
Source File: Assert.template.cs
public static Exception Catch(Type expectedExceptionType, TestDelegate code, string message)
        {
            return Throws(new InstanceOfTypeConstraint(expectedExceptionType), code, message);
        }

19. Example

Project: AutoTest.Net
Source File: Assert.cs
public static Exception Catch(TestDelegate code, string message)
        {
            return Throws(new InstanceOfTypeConstraint(typeof(Exception)), code, message);
        }

20. Example

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

21. Example

Project: AutoTest.Net
Source File: Assert.cs
public static Exception Catch(TestDelegate code, string message)
        {
            return Throws(new InstanceOfTypeConstraint(typeof(Exception)), code, message);
        }

22. Example

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

23. Example

Project: AutoTest.Net
Source File: Assert.template.cs
public static Exception Catch(TestDelegate code, string message)
        {
            return Throws(new InstanceOfTypeConstraint(typeof(Exception)), code, message);
        }

24. Example

Project: AutoTest.Net
Source File: Assert.template.cs
public static Exception Catch(Type expectedExceptionType, TestDelegate code, string message)
        {
            return Throws(new InstanceOfTypeConstraint(expectedExceptionType), code, message);
        }

25. Example

Project: SewingMachine
Source File: TestActor.cs
public Task When_Remove_non_existent_value_should_throw(CancellationToken cancellationToken)
        {
            IntPtr unsafeKey;
            Create(key, "Value", out unsafeKey);

            using (var tx = OpenSession())
            {
                Assert.Throws(Is.AssignableTo<Exception>(), () => tx.Remove(unsafeKey, 0), "Should not remove non-existing entry");
            }

            return Completed;
        }

26. Example

Project: IronTextLibrary
Source File: ScannerTest.cs
[Test]
        public void TestScanner()
        {
            var lang = Language.Get(typeof(MyMini/n ..... /n //View Source file for more details /n }