microting/eform-sdk-dotnet

View on GitHub
eFormCore/Helpers/TestHelpers.cs

Summary

Maintainability
D
2 days
Test Coverage

File TestHelpers.cs has 423 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using System;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
Severity: Minor
Found in eFormCore/Helpers/TestHelpers.cs - About 6 hrs to fix

    Method CreateField has 29 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            public async Task<Field> CreateField(short? barcodeEnabled, string barcodeType, CheckList checkList,
                string color, string custom, int? decimalCount, string defaultValue, string description, int? displayIndex,
                short? dummy, FieldType ft, short? geolocationEnabled, short? geolocationForced, short? geolocationHidden,
                short? isNum, string label, short? mandatory, int maxLength, string maxValue, string minValue, short? multi,
                short? optional, string queryType, short? readOnly, short? selected, short? split, short? stopOnSave,
    Severity: Major
    Found in eFormCore/Helpers/TestHelpers.cs - About 3 hrs to fix

      Method CreateCase has 16 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              public async Task<Case> CreateCase(string caseUId, CheckList checkList, DateTime created_at, string custom,
                  DateTime done_at, Worker doneByUserId, int microtingCheckId, int microtingUId, Site site, int? status,
                  string caseType, Unit unit, DateTime updated_at, int version, Worker worker, string WorkFlowState)
      Severity: Major
      Found in eFormCore/Helpers/TestHelpers.cs - About 2 hrs to fix

        Method CreateField has 49 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public async Task<Field> CreateField(short? barcodeEnabled, string barcodeType, CheckList checkList,
                    string color, string custom, int? decimalCount, string defaultValue, string description, int? displayIndex,
                    short? dummy, FieldType ft, short? geolocationEnabled, short? geolocationForced, short? geolocationHidden,
                    short? isNum, string label, short? mandatory, int maxLength, string maxValue, string minValue, short? multi,
                    short? optional, string queryType, short? readOnly, short? selected, short? split, short? stopOnSave,
        Severity: Minor
        Found in eFormCore/Helpers/TestHelpers.cs - About 1 hr to fix

          Method CreateUploadedData has 36 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public async Task<UploadedData> CreateUploadedData(string checkSum, string currentFile, string extension,
                      string fileLocation, string fileName, short? local, Worker worker, string uploaderType, int version,
                      bool createPhysicalFile)
                  {
                      UploadedData UD = new UploadedData
          Severity: Minor
          Found in eFormCore/Helpers/TestHelpers.cs - About 1 hr to fix

            Method CreateUploadedData has 10 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    public async Task<UploadedData> CreateUploadedData(string checkSum, string currentFile, string extension,
                        string fileLocation, string fileName, short? local, Worker worker, string uploaderType, int version,
                        bool createPhysicalFile)
            Severity: Major
            Found in eFormCore/Helpers/TestHelpers.cs - About 1 hr to fix

              Method CreateEntityItem has 9 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      public async Task<EntityItem> CreateEntityItem(string description, int displayIndex, int entityGroupId,
                          string entityItemUId, string microtingUId, string name, short? synced, int version, string workflowState)
              Severity: Major
              Found in eFormCore/Helpers/TestHelpers.cs - About 1 hr to fix

                Method CreateCase has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        public async Task<Case> CreateCase(string caseUId, CheckList checkList, DateTime created_at, string custom,
                            DateTime done_at, Worker doneByUserId, int microtingCheckId, int microtingUId, Site site, int? status,
                            string caseType, Unit unit, DateTime updated_at, int version, Worker worker, string WorkFlowState)
                        {
                            Case aCase = new Case
                Severity: Minor
                Found in eFormCore/Helpers/TestHelpers.cs - About 1 hr to fix

                  Method CreateFieldValue has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          public async Task<FieldValue> CreateFieldValue(Case aCase, CheckList checkList, Field f, int? ud_id,
                              int? userId, string value, int? version, Worker worker)
                          {
                              FieldValue fv = new FieldValue
                              {
                  Severity: Minor
                  Found in eFormCore/Helpers/TestHelpers.cs - About 1 hr to fix

                    Method CreateTemplate has 8 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            public async Task<CheckList> CreateTemplate(DateTime cl_ca, DateTime cl_ua, string label, string description,
                                string caseType, string folderName, int displayIndex, int repeated)
                    Severity: Major
                    Found in eFormCore/Helpers/TestHelpers.cs - About 1 hr to fix

                      Method CreateFieldValue has 8 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              public async Task<FieldValue> CreateFieldValue(Case aCase, CheckList checkList, Field f, int? ud_id,
                                  int? userId, string value, int? version, Worker worker)
                      Severity: Major
                      Found in eFormCore/Helpers/TestHelpers.cs - About 1 hr to fix

                        Method CreateCheckListSite has 7 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                public async Task<CheckListSite> CreateCheckListSite(CheckList checklist, DateTime createdAt,
                                    Site site, DateTime updatedAt, int version, string workflowState, int microting_uid)
                        Severity: Major
                        Found in eFormCore/Helpers/TestHelpers.cs - About 50 mins to fix

                          Method CreateSubTemplate has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                  public async Task<CheckList> CreateSubTemplate(string label, string description, string caseType,
                                      int displayIndex, int repeated, CheckList parentId)
                          Severity: Minor
                          Found in eFormCore/Helpers/TestHelpers.cs - About 45 mins to fix

                            Method CreateCheckListValue has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                    public async Task<CheckListValue> CreateCheckListValue(Case aCase, CheckList checkList, string status,
                                        int? userId, int? version)
                            Severity: Minor
                            Found in eFormCore/Helpers/TestHelpers.cs - About 35 mins to fix

                              There are no issues that match your filters.

                              Category
                              Status