Badgerati/Edison

View on GitHub
Edison.Engine/Threading/TestThread.cs

Summary

Maintainability
D
1 day
Test Coverage

File TestThread.cs has 310 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using Edison.Engine.Contexts;
using Edison.Engine.Repositories.Interfaces;
using Edison.Engine.Utilities.Structures;
using Edison.Framework;
using Edison.Injector;
Severity: Minor
Found in Edison.Engine/Threading/TestThread.cs - About 3 hrs to fix

    Method RunTestCase has 67 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            private void RunTestCase(MethodInfo test, TestCaseAttribute testCase, int testRepeat, IEnumerable<MethodInfo> setup, IEnumerable<MethodInfo> teardown)
            {
                var timeTaken = new Stopwatch();
                var testResult = default(TestResult);
    
    
    Severity: Major
    Found in Edison.Engine/Threading/TestThread.cs - About 2 hrs to fix

      Method PopulateTestResultOnException has 56 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              private TestResult PopulateTestResultOnException(MethodInfo testMethod, TestResult result, Exception ex, bool globalSetup, bool fixSetup, bool setup, bool teardown, bool test, TimeSpan time)
              {
                  var hasInner = ex.InnerException != default(Exception);
                  var innerExceptionType = hasInner ? ex.InnerException.GetType() : default(Type);
                  var isAssertFail = innerExceptionType == typeof(AssertException);
      Severity: Major
      Found in Edison.Engine/Threading/TestThread.cs - About 2 hrs to fix

        Method CheckExpectedException has 40 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                private bool CheckExpectedException(MethodInfo testMethod, bool isAssertFail, Exception innerException)
                {
                    var expectedException = ReflectionRepository.GetExpectedException(testMethod);
        
                    if (expectedException == default(ExpectedExceptionAttribute)
        Severity: Minor
        Found in Edison.Engine/Threading/TestThread.cs - About 1 hr to fix

          Method PopulateTestResultOnException has 9 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  private TestResult PopulateTestResultOnException(MethodInfo testMethod, TestResult result, Exception ex, bool globalSetup, bool fixSetup, bool setup, bool teardown, bool test, TimeSpan time)
          Severity: Major
          Found in Edison.Engine/Threading/TestThread.cs - About 1 hr to fix

            Method PopulateTestResult has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    private TestResult PopulateTestResult(MethodInfo testMethod, TestResult result, TestResultState state, TimeSpan time, string errorMessage = "", string stackTrace = "")
            Severity: Minor
            Found in Edison.Engine/Threading/TestThread.cs - About 45 mins to fix

              Method RunTestCases has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      private void RunTestCases(MethodInfo test, IEnumerable<TestCaseAttribute> cases, int testRepeat, IEnumerable<MethodInfo> setup, IEnumerable<MethodInfo> teardown)
              Severity: Minor
              Found in Edison.Engine/Threading/TestThread.cs - About 35 mins to fix

                Method RunTestCase has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        private void RunTestCase(MethodInfo test, TestCaseAttribute testCase, int testRepeat, IEnumerable<MethodInfo> setup, IEnumerable<MethodInfo> teardown)
                Severity: Minor
                Found in Edison.Engine/Threading/TestThread.cs - About 35 mins to fix

                  There are no issues that match your filters.

                  Category
                  Status