microting/eform-sdk-dotnet

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

Summary

Maintainability
F
4 days
Test Coverage

Method CheckListSites_Update_DoesUpdate has 89 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        [Test]
        public async Task CheckListSites_Update_DoesUpdate()
        {
            //Arrange

Severity: Major
Found in eFormSDK.CheckLists.Tests/CheckListSitesUTest.cs - About 3 hrs to fix

    Method CheckListSites_Delete_DoesSetWorkflowStateToRemoved has 85 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

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

      Method CheckListSites_Create_DoesCreate has 75 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

        File CheckListSitesUTest.cs has 271 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: Minor
        Found in eFormSDK.CheckLists.Tests/CheckListSitesUTest.cs - About 2 hrs to fix

          Similar blocks of code found in 18 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/CheckListSitesUTest.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/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/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 checklist = new CheckList
                      {
                          Color = Guid.NewGuid().ToString(),
                          Custom = Guid.NewGuid().ToString(),
                          Description = Guid.NewGuid().ToString(),
          Severity: Major
          Found in eFormSDK.CheckLists.Tests/CheckListSitesUTest.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 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/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 checklist = new CheckList
                      {
                          Color = Guid.NewGuid().ToString(),
                          Custom = Guid.NewGuid().ToString(),
                          Description = Guid.NewGuid().ToString(),
          Severity: Major
          Found in eFormSDK.CheckLists.Tests/CheckListSitesUTest.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 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/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

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

                      CheckListSite checkListSite = new CheckListSite
                      {
                          MicrotingUid = rnd.Next(1, 255),
                          SiteId = site.Id,
                          CheckListId = checklist.Id,
          Severity: Minor
          Found in eFormSDK.CheckLists.Tests/CheckListSitesUTest.cs and 2 other locations - About 30 mins to fix
          eFormSDK.CheckLists.Tests/CheckListSitesUTest.cs on lines 93..99
          eFormSDK.CheckLists.Tests/CheckListSitesUTest.cs on lines 308..314

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

          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

                      CheckListSite checkListSite = new CheckListSite
                      {
                          MicrotingUid = rnd.Next(1, 255),
                          SiteId = site.Id,
                          CheckListId = checklist.Id,
          Severity: Minor
          Found in eFormSDK.CheckLists.Tests/CheckListSitesUTest.cs and 2 other locations - About 30 mins to fix
          eFormSDK.CheckLists.Tests/CheckListSitesUTest.cs on lines 93..99
          eFormSDK.CheckLists.Tests/CheckListSitesUTest.cs on lines 191..197

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

          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

                      CheckListSite checkListSite = new CheckListSite
                      {
                          MicrotingUid = rnd.Next(1, 255),
                          SiteId = site.Id,
                          CheckListId = checklist.Id,
          Severity: Minor
          Found in eFormSDK.CheckLists.Tests/CheckListSitesUTest.cs and 2 other locations - About 30 mins to fix
          eFormSDK.CheckLists.Tests/CheckListSitesUTest.cs on lines 191..197
          eFormSDK.CheckLists.Tests/CheckListSitesUTest.cs on lines 308..314

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

          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