Badgerati/Edison

View on GitHub
Edison.Engine.Test/Contexts/ContextValidatorTests.cs

Summary

Maintainability
F
3 days
Test Coverage

File ContextValidatorTests.cs has 287 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using Edison.Engine.Contexts;
using Edison.Engine.Core.Exceptions;
using Edison.Engine.Repositories.Interfaces;
using Edison.Engine.Validators;
using Edison.Injector;
Severity: Minor
Found in Edison.Engine.Test/Contexts/ContextValidatorTests.cs - About 2 hrs to fix

    Method ValidSolutionAndAssemblyTest has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            [Test]
            public void ValidSolutionAndAssemblyTest()
            {
                var sln = "dummy/path/to.sln";
                var dll1Win = @"dummy\path\Edison.Framework\bin\Debug\Edison.Framework.dll";
    Severity: Minor
    Found in Edison.Engine.Test/Contexts/ContextValidatorTests.cs - About 1 hr to fix

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

              [Test]
              public void ValidFileForFixturesTest()
              {
                  var fixture1 = "this.is.some.fixture";
                  var fixture2 = "this.is.some.fixture2";
      Severity: Major
      Found in Edison.Engine.Test/Contexts/ContextValidatorTests.cs and 1 other location - About 4 hrs to fix
      Edison.Engine.Test/Contexts/ContextValidatorTests.cs on lines 323..342

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 281.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

              [Test]
              public void ValidFileForTestsTest()
              {
                  var test1 = "this.is.some.test";
                  var test2 = "this.is.some.test2";
      Severity: Major
      Found in Edison.Engine.Test/Contexts/ContextValidatorTests.cs and 1 other location - About 4 hrs to fix
      Edison.Engine.Test/Contexts/ContextValidatorTests.cs on lines 269..288

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 281.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 4 locations. Consider refactoring.
      Open

              [Test]
              [ExpectedException(ExpectedException = typeof(ValidationException), ExpectedMessage = "File for list of tests not found: 'dummy/path/to/file'")]
              public void InvalidFileForTestsTest()
              {
                  var test = "this.is.some.test";
      Severity: Major
      Found in Edison.Engine.Test/Contexts/ContextValidatorTests.cs and 3 other locations - About 3 hrs to fix
      Edison.Engine.Test/Contexts/ContextValidatorTests.cs on lines 134..150
      Edison.Engine.Test/Contexts/ContextValidatorTests.cs on lines 152..168
      Edison.Engine.Test/Contexts/ContextValidatorTests.cs on lines 290..306

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 231.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 4 locations. Consider refactoring.
      Open

              [Test]
              [ExpectedException(ExpectedException = typeof(ValidationException), ExpectedMessage = "File for list of assemblies not found: 'dummy/path/to/file'")]
              public void InvalidFileForAssemblyTest()
              {
                  var dll = "dummy/path/to.dll";
      Severity: Major
      Found in Edison.Engine.Test/Contexts/ContextValidatorTests.cs and 3 other locations - About 3 hrs to fix
      Edison.Engine.Test/Contexts/ContextValidatorTests.cs on lines 134..150
      Edison.Engine.Test/Contexts/ContextValidatorTests.cs on lines 290..306
      Edison.Engine.Test/Contexts/ContextValidatorTests.cs on lines 344..360

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 231.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 4 locations. Consider refactoring.
      Open

              [Test]
              [ExpectedException(ExpectedException = typeof(ValidationException), ExpectedMessage = "Assembly is not a valid .dll file: 'dummy/path/to.txt'")]
              public void ValidFileWithInvalidDllForAssemblyTest()
              {
                  var dll = "dummy/path/to.txt";
      Severity: Major
      Found in Edison.Engine.Test/Contexts/ContextValidatorTests.cs and 3 other locations - About 3 hrs to fix
      Edison.Engine.Test/Contexts/ContextValidatorTests.cs on lines 152..168
      Edison.Engine.Test/Contexts/ContextValidatorTests.cs on lines 290..306
      Edison.Engine.Test/Contexts/ContextValidatorTests.cs on lines 344..360

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 231.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 4 locations. Consider refactoring.
      Open

              [Test]
              [ExpectedException(ExpectedException = typeof(ValidationException), ExpectedMessage = "File for list of fixtures not found: 'dummy/path/to/file'")]
              public void InvalidFileForFixturesTest()
              {
                  var fixture = "this.is.some.fixture";
      Severity: Major
      Found in Edison.Engine.Test/Contexts/ContextValidatorTests.cs and 3 other locations - About 3 hrs to fix
      Edison.Engine.Test/Contexts/ContextValidatorTests.cs on lines 134..150
      Edison.Engine.Test/Contexts/ContextValidatorTests.cs on lines 152..168
      Edison.Engine.Test/Contexts/ContextValidatorTests.cs on lines 344..360

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 231.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

              {
                  var dll = "dummy/path/to.txt";
      
                  var fileMock = new Mock<IFileRepository>();
                  fileMock.Setup(x => x.Exists(dll)).Returns(false);
      Severity: Major
      Found in Edison.Engine.Test/Contexts/ContextValidatorTests.cs and 1 other location - About 1 hr to fix
      Edison.Engine.Test/Contexts/ContextValidatorTests.cs on lines 52..63

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 139.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

              {
                  var dll = "dummy/path/to.dll";
      
                  var fileMock = new Mock<IFileRepository>();
                  fileMock.Setup(x => x.Exists(dll)).Returns(true);
      Severity: Major
      Found in Edison.Engine.Test/Contexts/ContextValidatorTests.cs and 1 other location - About 1 hr to fix
      Edison.Engine.Test/Contexts/ContextValidatorTests.cs on lines 68..79

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 139.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

              [Test]
              public void ValidFixtureTest()
              {
                  var fixture = "this.is.some.fixture";
                  
      Severity: Minor
      Found in Edison.Engine.Test/Contexts/ContextValidatorTests.cs and 1 other location - About 40 mins to fix
      Edison.Engine.Test/Contexts/ContextValidatorTests.cs on lines 312..321

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 72.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

              [Test]
              public void ValidTestTest()
              {
                  var test = "this.is.some.test";
                  
      Severity: Minor
      Found in Edison.Engine.Test/Contexts/ContextValidatorTests.cs and 1 other location - About 40 mins to fix
      Edison.Engine.Test/Contexts/ContextValidatorTests.cs on lines 258..267

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 72.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

                  if (context.Assemblies.Contains(dll1Win))
                  {
                      Assert.Contains(dll1Win, context.Assemblies);
                  }
                  else
      Severity: Minor
      Found in Edison.Engine.Test/Contexts/ContextValidatorTests.cs and 1 other location - About 30 mins to fix
      Edison.Engine.Test/Contexts/ContextValidatorTests.cs on lines 194..201

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 60.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

                  if (context.Assemblies.Contains(dllWin))
                  {
                      Assert.Contains(dllWin, context.Assemblies);
                  }
                  else
      Severity: Minor
      Found in Edison.Engine.Test/Contexts/ContextValidatorTests.cs and 1 other location - About 30 mins to fix
      Edison.Engine.Test/Contexts/ContextValidatorTests.cs on lines 244..251

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 60.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      There are no issues that match your filters.

      Category
      Status