microting/eform-sdk-dotnet

View on GitHub
eFormSDK.Integration.Tests/CoreTestCase.cs

Summary

Maintainability
F
1 mo
Test Coverage

File CoreTestCase.cs has 2752 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using eFormCore;
using Microsoft.EntityFrameworkCore;
using NUnit.Framework;
using System;
using System.Collections.Generic;
Severity: Major
Found in eFormSDK.Integration.Tests/CoreTestCase.cs - About 1 wk to fix

    Method Core_Case_CaseUpdate_ReturnsTrue has 272 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            [Test]
            public async Task Core_Case_CaseUpdate_ReturnsTrue()
            {
                // Arrange
                #region Arrance
    Severity: Major
    Found in eFormSDK.Integration.Tests/CoreTestCase.cs - About 1 day to fix

      Method Core_Case_CaseToJasperXml_ReturnsPath has 261 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              [Test]
              public async Task Core_Case_CaseToJasperXml_ReturnsPath()
              {
                  // Arrange
                  #region Arrance
      Severity: Major
      Found in eFormSDK.Integration.Tests/CoreTestCase.cs - About 1 day to fix

        Method Core_Case_GetHttpServerAddress_returnsPath has 256 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                [Test]
                public async Task Core_Case_GetHttpServerAddress_returnsPath()
                {
                    // Arrange
                    #region Arrance
        Severity: Major
        Found in eFormSDK.Integration.Tests/CoreTestCase.cs - About 1 day to fix

          Method Core_Case_GetPicturePath_returnsPath has 256 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  [Test]
                  public async Task Core_Case_GetPicturePath_returnsPath()
                  {
                      // Arrange
                      #region Arrance
          Severity: Major
          Found in eFormSDK.Integration.Tests/CoreTestCase.cs - About 1 day to fix

            Method Core_Case_GetJasperPath_returnsPath has 256 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    [Test]
                    public async Task Core_Case_GetJasperPath_returnsPath()
                    {
                        // Arrange
                        #region Arrance
            Severity: Major
            Found in eFormSDK.Integration.Tests/CoreTestCase.cs - About 1 day to fix

              Method Core_Case_GetPdfPath_returnsPath has 256 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      [Test]
                      public async Task Core_Case_GetPdfPath_returnsPath()
                      {
                          // Arrange
                          #region Arrance
              Severity: Major
              Found in eFormSDK.Integration.Tests/CoreTestCase.cs - About 1 day to fix

                Method Core_Case_CasesToCsv_returnsPathAndName has 254 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        [Test]
                        public async Task Core_Case_CasesToCsv_returnsPathAndName()
                        {
                            // Arrange
                            #region Arrance
                Severity: Major
                Found in eFormSDK.Integration.Tests/CoreTestCase.cs - About 1 day to fix

                  Method Core_Case_CaseUpdateFieldValues has 236 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          [Test]
                          public async Task Core_Case_CaseUpdateFieldValues()
                          {
                  
                  
                  
                  Severity: Major
                  Found in eFormSDK.Integration.Tests/CoreTestCase.cs - About 1 day to fix

                    Method Core_Case_CaseLookupMUId_Returns_ReturnCase has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            [Test]
                            public async Task Core_Case_CaseLookupMUId_Returns_ReturnCase()
                            {
                                // Arrance
                                #region Arrance
                    Severity: Major
                    Found in eFormSDK.Integration.Tests/CoreTestCase.cs - About 4 hrs to fix

                      Method Core_Case_CaseIdLookUp_returnsId has 93 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              [Test]
                              public async Task Core_Case_CaseIdLookUp_returnsId()
                              {
                      
                                  // Arrange
                      Severity: Major
                      Found in eFormSDK.Integration.Tests/CoreTestCase.cs - About 3 hrs to fix

                        Class CoreTestCase has 30 methods (exceeds 20 allowed). Consider refactoring.
                        Open

                            [TestFixture]
                            public class CoreTestCase : DbTestFixture
                            {
                                private Core sut;
                                private TestHelpers testHelpers;
                        Severity: Minor
                        Found in eFormSDK.Integration.Tests/CoreTestCase.cs - About 3 hrs to fix

                          Method Core_Case_CaseRead_ReadsCase has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  [Test]
                                  public async Task Core_Case_CaseRead_ReadsCase()
                                  {
                                      // Arrange
                                      #region Arrance
                          Severity: Major
                          Found in eFormSDK.Integration.Tests/CoreTestCase.cs - About 3 hrs to fix

                            Method Core_Case_CaseReadFirstId has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    [Test]
                                    public async Task Core_Case_CaseReadFirstId()
                                    {
                                        // Arrance
                                        #region Arrance
                            Severity: Major
                            Found in eFormSDK.Integration.Tests/CoreTestCase.cs - About 2 hrs to fix

                              Method Core_Case_CaseReadByCaseId_Returns_cDto has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      [Test]
                                      public async Task Core_Case_CaseReadByCaseId_Returns_cDto()
                                      {
                                          // Arrance
                                          #region Arrance
                              Severity: Major
                              Found in eFormSDK.Integration.Tests/CoreTestCase.cs - About 2 hrs to fix

                                Method Core_Case_CaseLookupCaseUId_Returns_lstDto has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        [Test]
                                        public async Task Core_Case_CaseLookupCaseUId_Returns_lstDto()
                                        {
                                            // Arrance
                                            #region Arrance
                                Severity: Major
                                Found in eFormSDK.Integration.Tests/CoreTestCase.cs - About 2 hrs to fix

                                  Method Core_Case_CaseLookupCaseId_Returns_cDto has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          [Test]
                                          public async Task Core_Case_CaseLookupCaseId_Returns_cDto()
                                          {
                                              // Arrance
                                              #region Arrance
                                  Severity: Major
                                  Found in eFormSDK.Integration.Tests/CoreTestCase.cs - About 2 hrs to fix

                                    Method Core_Case_CaseDeleteResult_DoesMarkCaseRemoved has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            [Test]
                                            public async Task Core_Case_CaseDeleteResult_DoesMarkCaseRemoved()
                                            {
                                    
                                                // Arrance
                                    Severity: Minor
                                    Found in eFormSDK.Integration.Tests/CoreTestCase.cs - About 1 hr to fix

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

                                              [Test]
                                              public async Task Core_Case_GetPicturePath_returnsPath()
                                              {
                                                  // Arrange
                                                  #region Arrance
                                      Severity: Major
                                      Found in eFormSDK.Integration.Tests/CoreTestCase.cs and 2 other locations - About 1 wk to fix
                                      eFormSDK.Integration.Tests/CoreTestCase.cs on lines 3869..4273
                                      eFormSDK.Integration.Tests/CoreTestCase.cs on lines 4704..5107

                                      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 4157.

                                      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 3 locations. Consider refactoring.
                                      Open

                                              [Test]
                                              public async Task Core_Case_GetPdfPath_returnsPath()
                                              {
                                                  // Arrange
                                                  #region Arrance
                                      Severity: Major
                                      Found in eFormSDK.Integration.Tests/CoreTestCase.cs and 2 other locations - About 1 wk to fix
                                      eFormSDK.Integration.Tests/CoreTestCase.cs on lines 3869..4273
                                      eFormSDK.Integration.Tests/CoreTestCase.cs on lines 4287..4690

                                      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 4157.

                                      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 3 locations. Consider refactoring.
                                      Open

                                              [Test]
                                              public async Task Core_Case_GetJasperPath_returnsPath()
                                              {
                                                  // Arrange
                                                  #region Arrance
                                      Severity: Major
                                      Found in eFormSDK.Integration.Tests/CoreTestCase.cs and 2 other locations - About 1 wk to fix
                                      eFormSDK.Integration.Tests/CoreTestCase.cs on lines 4287..4690
                                      eFormSDK.Integration.Tests/CoreTestCase.cs on lines 4704..5107

                                      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 4157.

                                      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 async Task Core_Case_CaseLookupCaseId_Returns_cDto()
                                              {
                                                  // Arrance
                                                  #region Arrance
                                      Severity: Major
                                      Found in eFormSDK.Integration.Tests/CoreTestCase.cs and 1 other location - About 2 days to fix
                                      eFormSDK.Integration.Tests/CoreTestCase.cs on lines 372..479

                                      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 1057.

                                      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 async Task Core_Case_CaseReadByCaseId_Returns_cDto()
                                              {
                                                  // Arrance
                                                  #region Arrance
                                      Severity: Major
                                      Found in eFormSDK.Integration.Tests/CoreTestCase.cs and 1 other location - About 2 days to fix
                                      eFormSDK.Integration.Tests/CoreTestCase.cs on lines 2281..2388

                                      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 1057.

                                      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

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

                                              public override async Task DoSetup()
                                              {
                                                  #region Setup SettingsTableContent
                                                  
                                                  DbContextHelper dbContextHelper = new DbContextHelper(ConnectionString);
                                      Severity: Major
                                      Found in eFormSDK.Integration.Tests/CoreTestCase.cs and 1 other location - About 5 hrs to fix
                                      eFormSDK.Integration.Tests/CoreTestCaseCreate.cs on lines 49..75

                                      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 366.

                                      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 5 locations. Consider refactoring.
                                      Open

                                              [Test]
                                              public async Task Core_Case_SetJasperPath_returnsTrue()
                                              {
                                      
                                                  // Arrange
                                      Severity: Major
                                      Found in eFormSDK.Integration.Tests/CoreTestCase.cs and 4 other locations - About 35 mins to fix
                                      eFormSDK.Integration.Case.CoreTests/CoreTestCase.cs on lines 2706..2716
                                      eFormSDK.Integration.Case.CoreTests/CoreTestCase.cs on lines 2736..2746
                                      eFormSDK.Integration.Tests/CoreTestCase.cs on lines 4691..4703
                                      eFormSDK.Integration.Tests/CoreTestCase.cs on lines 5513..5523

                                      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 65.

                                      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 5 locations. Consider refactoring.
                                      Open

                                              [Test]
                                              public async Task Core_Case_SetPicturePath_returnsTrue()
                                              {
                                      
                                                  // Arrange
                                      Severity: Major
                                      Found in eFormSDK.Integration.Tests/CoreTestCase.cs and 4 other locations - About 35 mins to fix
                                      eFormSDK.Integration.Case.CoreTests/CoreTestCase.cs on lines 2706..2716
                                      eFormSDK.Integration.Case.CoreTests/CoreTestCase.cs on lines 2736..2746
                                      eFormSDK.Integration.Tests/CoreTestCase.cs on lines 4274..4286
                                      eFormSDK.Integration.Tests/CoreTestCase.cs on lines 5513..5523

                                      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 65.

                                      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 5 locations. Consider refactoring.
                                      Open

                                              [Test]
                                              public async Task Core_Case_SetHttpServerAddress_ReturnsTrue()
                                              {
                                                  // Arrange
                                      
                                      
                                      Severity: Major
                                      Found in eFormSDK.Integration.Tests/CoreTestCase.cs and 4 other locations - About 35 mins to fix
                                      eFormSDK.Integration.Case.CoreTests/CoreTestCase.cs on lines 2706..2716
                                      eFormSDK.Integration.Case.CoreTests/CoreTestCase.cs on lines 2736..2746
                                      eFormSDK.Integration.Tests/CoreTestCase.cs on lines 4274..4286
                                      eFormSDK.Integration.Tests/CoreTestCase.cs on lines 4691..4703

                                      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 65.

                                      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

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

                                                  {
                                                      MicrotingUid = rnd.Next(shortMinValue, shortmaxValue),
                                                      MicrotingCheckUid = rnd.Next(shortMinValue, shortmaxValue),
                                                      WorkflowState = Constants.WorkflowStates.Created,
                                                      CheckListId = cl.Id,
                                      Severity: Minor
                                      Found in eFormSDK.Integration.Tests/CoreTestCase.cs and 1 other location - About 30 mins to fix
                                      eFormSDK.Integration.Case.CoreTests/CoreTestCase.cs on lines 82..88

                                      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