Promact/slack-erp-custom-integration-mvc

View on GitHub
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs

Summary

Maintainability
F
6 days
Test Coverage

File RedmineRepositoryTest.cs has 569 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using Autofac;
using Moq;
using Newtonsoft.Json;
using Promact.Core.Repository.RedmineRepository;
using Promact.Erp.DomainModel.ApplicationClass;
Severity: Major
Found in Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs - About 1 day to fix

    Class RedmineRepositoryTest has 43 methods (exceeds 20 allowed). Consider refactoring.
    Open

        public class RedmineRepositoryTest
        {
            #region Private Variables
            private readonly IComponentContext _componentContext;
            private readonly IStringConstantRepository _stringConstant;
    Severity: Minor
    Found in Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs - About 5 hrs to fix

      Method Initialize has 68 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              public void Initialize()
              {
                  slashCommand.UserId = _stringConstant.UserSlackId;
                  project.Projects = new List<RedmineProject>();
                  project.IssueCount = 25;
      Severity: Major
      Found in Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs - About 2 hrs to fix

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

                [Fact, Trait("Category", "Required")]
                public async Task RedmineSlackRequestWrongIssueActionAsync()
                {
                    await CreateUserAsync();
                    slashCommand.Text = _stringConstant.RedmineWrongIssueActionCommand;
        Severity: Major
        Found in Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs and 1 other location - About 3 hrs to fix
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 170..181

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

        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

                [Fact, Trait("Category", "Required")]
                public async Task RedmineSlackRequestIssueCreateWrongPriorityAsync()
                {
                    await CreateUserAsync();
                    slashCommand.Text = _stringConstant.RedmineCommandCreateWrongPriority;
        Severity: Major
        Found in Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs and 1 other location - About 3 hrs to fix
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 110..121

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

        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

                [Fact, Trait("Category", "Required")]
                public async Task RedmineSlackRequestIssueTimeEntryHourFormatIssueAsync()
                {
                    await CreateUserAsync();
                    slashCommand.Text = _stringConstant.RedmineTimeEntryHourFormatCommand;
        Severity: Major
        Found in Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs and 1 other location - About 2 hrs to fix
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 247..258

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

        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

                [Fact, Trait("Category", "Required")]
                public async Task RedmineSlackRequestIssueCreateErrorAsync()
                {
                    await CreateUserAsync();
                    slashCommand.Text = _stringConstant.RedmineCommandCreate;
        Severity: Major
        Found in Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs and 1 other location - About 2 hrs to fix
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 414..425

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

        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

                [Fact, Trait("Category", "Required")]
                public async Task RedmineSlackRequestIssueListProjectNotFoundAsync()
                {
                    await CreateUserAsync();
                    slashCommand.Text = _stringConstant.RedmineCommandIssueList;
        Severity: Major
        Found in Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs and 2 other locations - About 2 hrs to fix
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 282..291
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 400..409

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

        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

                [Fact, Trait("Category", "Required")]
                public async Task RedmineSlackRequestIssueChangeAssignNoIssueAsync()
                {
                    await CreateUserAsync();
                    slashCommand.Text = _stringConstant.RedmineCommandChangeAssign;
        Severity: Major
        Found in Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs and 2 other locations - About 2 hrs to fix
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 140..149
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 400..409

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

        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

                [Fact, Trait("Category", "Required")]
                public async Task RedmineSlackRequestIssueTimeEntryServerResponseNullAsync()
                {
                    await CreateUserAsync();
                    slashCommand.Text = _stringConstant.RedmineTimeEntry;
        Severity: Major
        Found in Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs and 2 other locations - About 2 hrs to fix
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 140..149
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 282..291

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

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

                [Fact, Trait("Category", "Required")]
                public async Task RedmineSlackRequestIssueCreateWrongProjectIdAsync()
                {
                    await CreateUserAsync();
                    slashCommand.Text = _stringConstant.RedmineCommandCreateWrongProjectId;
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 80..89
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 126..135
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 386..395
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 501..510
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 536..545

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

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

                [Fact, Trait("Category", "Required")]
                public async Task RedmineSlackRequestAPIKeyInValidAsync()
                {
                    await CreateUserAsync();
                    slashCommand.Text = _stringConstant.RedmineAPIKeyCommand;
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 80..89
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 126..135
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 219..228
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 386..395
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 501..510

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

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

                [Fact, Trait("Category", "Required")]
                public async Task RedmineSlackRequestNoProjectFoundAsync()
                {
                    await CreateUserAsync();
                    slashCommand.Text = _stringConstant.RedmineCommandProjectList;
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 126..135
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 219..228
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 386..395
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 501..510
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 536..545

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

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

                [Fact, Trait("Category", "Required")]
                public async Task RedmineSlackRequestHelpAsync()
                {
                    await CreateUserAsync();
                    slashCommand.Text = _stringConstant.RedmineCommandHelp;
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 80..89
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 126..135
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 219..228
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 386..395
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 536..545

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

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

                [Fact, Trait("Category", "Required")]
                public async Task RedmineSlackRequestIssueTimeEntryWrongTypeIssueIdAsync()
                {
                    await CreateUserAsync();
                    slashCommand.Text = _stringConstant.RedmineTimeEntryWrongIssueId;
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 80..89
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 126..135
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 219..228
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 501..510
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 536..545

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

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

                [Fact, Trait("Category", "Required")]
                public async Task RedmineSlackRequestIssueListWrongProjectIdAsync()
                {
                    await CreateUserAsync();
                    slashCommand.Text = _stringConstant.RedmineCommandIssueListWrongProjectId;
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 80..89
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 219..228
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 386..395
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 501..510
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 536..545

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

        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

                    var replyText = string.Format(_stringConstant.RedmineStatusErrorMessage,
                            Status.New.ToString(), Status.InProgess.ToString(), Status.Confirmed.ToString(),
                            Status.Resolved.ToString(), Status.Hold.ToString(), Status.Feedback.ToString(),
                            Status.Closed.ToString(), Status.Rejected.ToString());
        Severity: Major
        Found in Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs and 1 other location - About 1 hr to fix
        Slack.Automation/Promact.Core.Repository/RedmineRepository/RedmineRepository.cs on lines 184..187

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

        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

                private void GetAsyncMethodMocking(string toReturn, string baseUrl, string contentUrl, string accessToken)
                {
                    var responseString = Task.FromResult(toReturn);
                    _mockHttpClient.Setup(x => x.GetAsync(baseUrl, contentUrl, accessToken, _stringConstant.RedmineApiKey)).Returns(responseString);
                }
        Severity: Minor
        Found in Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs and 1 other location - About 55 mins to fix
        Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 1370..1374

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

        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

                    _mockHttpClient.Setup(x => x.PutAsync(postRequestUrl, issueInJsonText, _stringConstant.JsonApplication, _stringConstant.AccessTokenForTest, _stringConstant.RedmineApiKey)).Returns(Task.FromResult(_stringConstant.Ok));
        Severity: Major
        Found in Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs and 2 other locations - About 40 mins to fix
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 331..331
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 377..377

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

        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

                    _mockHttpClient.Setup(x => x.PutAsync(postRequestUrl, issueInJsonText, _stringConstant.JsonApplication, _stringConstant.AccessTokenForTest, _stringConstant.RedmineApiKey)).Returns(Task.FromResult(_stringConstant.Ok));
        Severity: Major
        Found in Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs and 2 other locations - About 40 mins to fix
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 310..310
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 331..331

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

        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

                    _mockHttpClient.Setup(x => x.PutAsync(postRequestUrl, issueInJsonText, _stringConstant.JsonApplication, _stringConstant.AccessTokenForTest, _stringConstant.RedmineApiKey)).Returns(Task.FromResult(_stringConstant.Ok));
        Severity: Major
        Found in Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs and 2 other locations - About 40 mins to fix
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 310..310
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 377..377

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

        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

                    _mockHttpClient.Setup(x => x.PostAsync(postRequestUrl, issueInJsonText, _stringConstant.JsonApplication, _stringConstant.AccessTokenForTest, _stringConstant.RedmineApiKey)).Returns(Task.FromResult(RedmineResponseSingleProjectInJson()));
        Severity: Minor
        Found in Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs and 1 other location - About 40 mins to fix
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 491..492

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

        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

                    _mockHttpClient.Setup(x => x.PostAsync(postRequestUrl, jsonText, _stringConstant.JsonApplication,
                        _stringConstant.AccessTokenForTest, _stringConstant.RedmineApiKey)).Returns(Task.FromResult(RedmineTimeEntryApplicationClassInJson()));
        Severity: Minor
        Found in Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs and 1 other location - About 40 mins to fix
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 272..272

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

        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

                    singleIssue.Issue = new GetRedmineIssue()
                    {
                        AssignTo = redmineBase,
                        Description = _stringConstant.Admin,
                        IssueId = 123,
        Severity: Minor
        Found in Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs and 1 other location - About 35 mins to fix
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 586..596

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

        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

                    issueResponse.Issues.Add(new GetRedmineIssue()
                    {
                        AssignTo = redmineBase,
                        Description = _stringConstant.Admin,
                        IssueId = 123,
        Severity: Minor
        Found in Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs and 1 other location - About 35 mins to fix
        Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 605..615

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

        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

                    return string.Format(_stringConstant.RedmineIssueMessageFormat, issue.Project.Name, issue.IssueId,
                        issue.Subject, issue.Status.Name, issue.Priority.Name, issue.Tracker.Name);
        Severity: Minor
        Found in Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs and 1 other location - About 30 mins to fix
        Slack.Automation/Promact.Core.Repository/RedmineRepository/RedmineRepository.cs on lines 392..393

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

                    var replyText = string.Format(_stringConstant.RedmineTrackerErrorMessage,
                            Tracker.Bug.ToString(), Tracker.Feature.ToString(), Tracker.Support.ToString(),
                            Tracker.Tasks.ToString());
        Severity: Minor
        Found in Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs and 1 other location - About 30 mins to fix
        Slack.Automation/Promact.Core.Repository/RedmineRepository/RedmineRepository.cs on lines 203..205

        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