private void RunTest(ITestCase test)
 {
     TestResult result = new TestResult(test);
     System.Runtime.CompilerServices.RuntimeHelpers.PrepareConstrainedRegions();
     try
     {
         result.Start();
         test.Run(this.fixtureInstance);
         result.Success();
     }
     catch (Exception ex)
     {
         Exception current = ex;
         if (current is TargetInvocationException)
             current = current.InnerException;
         if (current is IgnoreException)
             result.Ignore();
         else if (current is AssumptionFailureException)
             result.Success();
         else
             result.Fail(current);
     }
     this.Owner.TestListener.Test(result);
 }
            private bool RunSetUp()
            {
                TestResult result = null;
                try
                {
                    if (this.Owner.Fixture.SetUp == null)
                        return true;

                    result = new TestResult(this.Owner.Fixture.Name, this.Owner.Fixture.SetUp);
                    result.Start();
                    this.Owner.Fixture.SetUp.Invoke(this.fixtureInstance,null);
                    result.Success();
                    this.Owner.TestListener.SetUp(result);

                    return true;
                }
                catch (Exception ex)
                {
                    if (result != null)
                    {
                        Exception current = ex;
                        if (current is TargetInvocationException)
                            current = ex.InnerException;
                        result.Fail(current);
                        this.Owner.TestListener.SetUp(result);
                    }
                    return false;
                }
            }
            private void RunTearDown()
            {
                TestResult result = null;
                System.Runtime.CompilerServices.RuntimeHelpers.PrepareConstrainedRegions();
                try
                {
                    if (this.Owner.Fixture.TearDown == null)
                        return;

                    result = new TestResult(this.Owner.Fixture.Name, this.Owner.Fixture.TearDown);
                    result.Start();
                    this.Owner.Fixture.TearDown.Invoke(this.fixtureInstance,null);
                    result.Success();
                }
                catch (Exception ex)
                {
                    if (result != null)
                    {
                        Exception current = ex;
                        if (current is TargetInvocationException)
                            current = ex.InnerException;
                        result.Fail(current);
                        this.Owner.TestListener.TearDown(result);
                    }
                }
            }
            private bool RunTestFixtureSetUp()
            {
                TestResult result = null; ;
                System.Runtime.CompilerServices.RuntimeHelpers.PrepareConstrainedRegions();
                try
                {
                    if (this.Owner.Fixture.FixtureSetUp == null)
                        return true;

                    result = new TestResult(this.Owner.Fixture.Name, this.Owner.Fixture.FixtureSetUp);
                    result.Start();
                    this.Owner.Fixture.FixtureSetUp.Invoke(null, null);
                    result.Success();
                    this.Owner.TestListener.FixtureSetUp(result);

                    return true;
                }
                catch (Exception ex)
                {
                    if (result != null)
                    {
                        Exception current = ex;
                        if (current is TargetInvocationException)
                            current = ex.InnerException;
                        result.Fail(current);
                        this.Owner.TestListener.FixtureSetUp(result);
                    }
                    return false;
                }
            }