NUnit.Framework.Assertions.TestSandBox.Run(System.Action)

Here are the examples of the csharp api class NUnit.Framework.Assertions.TestSandBox.Run(System.Action) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

3 Examples 7

1. Example

Project: nunit
Source File: LowTrustFixture.cs
View license
[Test]
        public void AssertThrowsInLowTrustSandBox()
        {
            _sandBox.Run(() =>
            {
                Assert.Throws<SecurityException>(() => new SecurityPermission(SecurityPermissionFlag.Infrastructure).Demand());
            });
        }

2. Example

Project: nunit
Source File: LowTrustFixture.cs
View license
[Test]
        public void AssertEqualityInLowTrustSandBox()
        {
            _sandBox.Run(() =>
            {
                Assert.That(1, Is.EqualTo(1));
            });
        }

3. Example

Project: nunit
Source File: LowTrustFixture.cs
View license
[Test]
        public void AssertEqualityWithToleranceInLowTrustSandBox()
        {
            _sandBox.Run(() =>
            {
                Assert.That(10.5, Is.EqualTo(10.5));
            });
        }