microting/eform-sdk-dotnet

View on GitHub
eFormSDK.CheckLists.Tests/CheckListsUTest.cs

Summary

Maintainability
F
1 wk
Test Coverage

File CheckListsUTest.cs has 602 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
Severity: Major
Found in eFormSDK.CheckLists.Tests/CheckListsUTest.cs - About 1 day to fix

    Method Checklists_Update_DoesUpdate has 245 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            [Test]
            public async Task Checklists_Update_DoesUpdate()
            {
                //Arrange
    
    
    Severity: Major
    Found in eFormSDK.CheckLists.Tests/CheckListsUTest.cs - About 1 day to fix

      Method CheckLists_Delete_DoesSetWorkflowStateToRemoved has 186 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              [Test]
              public async Task CheckLists_Delete_DoesSetWorkflowStateToRemoved()
              {
                  //Arrange
      
      
      Severity: Major
      Found in eFormSDK.CheckLists.Tests/CheckListsUTest.cs - About 7 hrs to fix

        Method Checklists_create_DoesCreate has 149 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                [Test]
                public async Task Checklists_create_DoesCreate()
                {
                    //Arrange
        
        
        Severity: Major
        Found in eFormSDK.CheckLists.Tests/CheckListsUTest.cs - About 5 hrs to fix

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

                      CheckList checklist = new CheckList
                      {
                          Color = Guid.NewGuid().ToString(),
                          Custom = Guid.NewGuid().ToString(),
                          Description = Guid.NewGuid().ToString(),
          Severity: Major
          Found in eFormSDK.CheckLists.Tests/CheckListsUTest.cs and 2 other locations - About 1 day to fix
          eFormSDK.CheckLists.Tests/CheckListsUTest.cs on lines 86..118
          eFormSDK.CheckLists.Tests/CheckListsUTest.cs on lines 257..289

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

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

                      CheckList checklist = new CheckList
                      {
                          Color = Guid.NewGuid().ToString(),
                          Custom = Guid.NewGuid().ToString(),
                          Description = Guid.NewGuid().ToString(),
          Severity: Major
          Found in eFormSDK.CheckLists.Tests/CheckListsUTest.cs and 2 other locations - About 1 day to fix
          eFormSDK.CheckLists.Tests/CheckListsUTest.cs on lines 86..118
          eFormSDK.CheckLists.Tests/CheckListsUTest.cs on lines 530..562

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

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

                      CheckList checklist = new CheckList
                      {
                          Color = Guid.NewGuid().ToString(),
                          Custom = Guid.NewGuid().ToString(),
                          Description = Guid.NewGuid().ToString(),
          Severity: Major
          Found in eFormSDK.CheckLists.Tests/CheckListsUTest.cs and 2 other locations - About 1 day to fix
          eFormSDK.CheckLists.Tests/CheckListsUTest.cs on lines 257..289
          eFormSDK.CheckLists.Tests/CheckListsUTest.cs on lines 530..562

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

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

                      CheckList checklistParent = new CheckList
                      {
                          Color = Guid.NewGuid().ToString(),
                          Custom = Guid.NewGuid().ToString(),
                          Description = Guid.NewGuid().ToString(),
          Severity: Major
          Found in eFormSDK.CheckLists.Tests/CheckListsUTest.cs and 17 other locations - About 7 hrs to fix
          eFormSDK.CheckLists.Tests/CasesUTest.cs on lines 79..110
          eFormSDK.CheckLists.Tests/CasesUTest.cs on lines 249..280
          eFormSDK.CheckLists.Tests/CasesUTest.cs on lines 485..516
          eFormSDK.CheckLists.Tests/CheckListSitesUTest.cs on lines 59..90
          eFormSDK.CheckLists.Tests/CheckListSitesUTest.cs on lines 157..188
          eFormSDK.CheckLists.Tests/CheckListSitesUTest.cs on lines 274..305
          eFormSDK.CheckLists.Tests/CheckListValuesUTest.cs on lines 79..110
          eFormSDK.CheckLists.Tests/CheckListValuesUTest.cs on lines 220..251
          eFormSDK.CheckLists.Tests/CheckListValuesUTest.cs on lines 377..408
          eFormSDK.CheckLists.Tests/CheckListsUTest.cs on lines 52..83
          eFormSDK.CheckLists.Tests/CheckListsUTest.cs on lines 496..527
          eFormSDK.CheckLists.Tests/FieldValuesUTest.cs on lines 66..97
          eFormSDK.CheckLists.Tests/FieldValuesUTest.cs on lines 297..328
          eFormSDK.CheckLists.Tests/FieldValuesUTest.cs on lines 567..598
          eFormSDK.CheckLists.Tests/FieldsUTest.cs on lines 66..97
          eFormSDK.CheckLists.Tests/FieldsUTest.cs on lines 305..336
          eFormSDK.CheckLists.Tests/FieldsUTest.cs on lines 642..673

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

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

                      CheckList checklistParent = new CheckList
                      {
                          Color = Guid.NewGuid().ToString(),
                          Custom = Guid.NewGuid().ToString(),
                          Description = Guid.NewGuid().ToString(),
          Severity: Major
          Found in eFormSDK.CheckLists.Tests/CheckListsUTest.cs and 17 other locations - About 7 hrs to fix
          eFormSDK.CheckLists.Tests/CasesUTest.cs on lines 79..110
          eFormSDK.CheckLists.Tests/CasesUTest.cs on lines 249..280
          eFormSDK.CheckLists.Tests/CasesUTest.cs on lines 485..516
          eFormSDK.CheckLists.Tests/CheckListSitesUTest.cs on lines 59..90
          eFormSDK.CheckLists.Tests/CheckListSitesUTest.cs on lines 157..188
          eFormSDK.CheckLists.Tests/CheckListSitesUTest.cs on lines 274..305
          eFormSDK.CheckLists.Tests/CheckListValuesUTest.cs on lines 79..110
          eFormSDK.CheckLists.Tests/CheckListValuesUTest.cs on lines 220..251
          eFormSDK.CheckLists.Tests/CheckListValuesUTest.cs on lines 377..408
          eFormSDK.CheckLists.Tests/CheckListsUTest.cs on lines 223..254
          eFormSDK.CheckLists.Tests/CheckListsUTest.cs on lines 496..527
          eFormSDK.CheckLists.Tests/FieldValuesUTest.cs on lines 66..97
          eFormSDK.CheckLists.Tests/FieldValuesUTest.cs on lines 297..328
          eFormSDK.CheckLists.Tests/FieldValuesUTest.cs on lines 567..598
          eFormSDK.CheckLists.Tests/FieldsUTest.cs on lines 66..97
          eFormSDK.CheckLists.Tests/FieldsUTest.cs on lines 305..336
          eFormSDK.CheckLists.Tests/FieldsUTest.cs on lines 642..673

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

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

                      CheckList checklistParent = new CheckList
                      {
                          Color = Guid.NewGuid().ToString(),
                          Custom = Guid.NewGuid().ToString(),
                          Description = Guid.NewGuid().ToString(),
          Severity: Major
          Found in eFormSDK.CheckLists.Tests/CheckListsUTest.cs and 17 other locations - About 7 hrs to fix
          eFormSDK.CheckLists.Tests/CasesUTest.cs on lines 79..110
          eFormSDK.CheckLists.Tests/CasesUTest.cs on lines 249..280
          eFormSDK.CheckLists.Tests/CasesUTest.cs on lines 485..516
          eFormSDK.CheckLists.Tests/CheckListSitesUTest.cs on lines 59..90
          eFormSDK.CheckLists.Tests/CheckListSitesUTest.cs on lines 157..188
          eFormSDK.CheckLists.Tests/CheckListSitesUTest.cs on lines 274..305
          eFormSDK.CheckLists.Tests/CheckListValuesUTest.cs on lines 79..110
          eFormSDK.CheckLists.Tests/CheckListValuesUTest.cs on lines 220..251
          eFormSDK.CheckLists.Tests/CheckListValuesUTest.cs on lines 377..408
          eFormSDK.CheckLists.Tests/CheckListsUTest.cs on lines 52..83
          eFormSDK.CheckLists.Tests/CheckListsUTest.cs on lines 223..254
          eFormSDK.CheckLists.Tests/FieldValuesUTest.cs on lines 66..97
          eFormSDK.CheckLists.Tests/FieldValuesUTest.cs on lines 297..328
          eFormSDK.CheckLists.Tests/FieldValuesUTest.cs on lines 567..598
          eFormSDK.CheckLists.Tests/FieldsUTest.cs on lines 66..97
          eFormSDK.CheckLists.Tests/FieldsUTest.cs on lines 305..336
          eFormSDK.CheckLists.Tests/FieldsUTest.cs on lines 642..673

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

          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