Edison.Engine/Threading/TestThread.cs
File TestThread.cs
has 310 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
using Edison.Engine.Contexts;
using Edison.Engine.Repositories.Interfaces;
using Edison.Engine.Utilities.Structures;
using Edison.Framework;
using Edison.Injector;
Method RunTestCase
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void RunTestCase(MethodInfo test, TestCaseAttribute testCase, int testRepeat, IEnumerable<MethodInfo> setup, IEnumerable<MethodInfo> teardown)
{
var timeTaken = new Stopwatch();
var testResult = default(TestResult);
Method PopulateTestResultOnException
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
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);
Method CheckExpectedException
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private bool CheckExpectedException(MethodInfo testMethod, bool isAssertFail, Exception innerException)
{
var expectedException = ReflectionRepository.GetExpectedException(testMethod);
if (expectedException == default(ExpectedExceptionAttribute)
Method PopulateTestResultOnException
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private TestResult PopulateTestResultOnException(MethodInfo testMethod, TestResult result, Exception ex, bool globalSetup, bool fixSetup, bool setup, bool teardown, bool test, TimeSpan time)
Method PopulateTestResult
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private TestResult PopulateTestResult(MethodInfo testMethod, TestResult result, TestResultState state, TimeSpan time, string errorMessage = "", string stackTrace = "")
Method RunTestCases
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private void RunTestCases(MethodInfo test, IEnumerable<TestCaseAttribute> cases, int testRepeat, IEnumerable<MethodInfo> setup, IEnumerable<MethodInfo> teardown)
Method RunTestCase
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private void RunTestCase(MethodInfo test, TestCaseAttribute testCase, int testRepeat, IEnumerable<MethodInfo> setup, IEnumerable<MethodInfo> teardown)