Badgerati/Edison

View on GitHub
Edison.Framework/Asserts/Assert.cs

Summary

Maintainability
F
5 days
Test Coverage

File Assert.cs has 656 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using Edison.Framework;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
Severity: Major
Found in Edison.Framework/Asserts/Assert.cs - About 1 day to fix

    Class Assert has 62 methods (exceeds 20 allowed). Consider refactoring.
    Open

        public class Assert : IAssert
        {
    
            #region Test state
    
    
    Severity: Major
    Found in Edison.Framework/Asserts/Assert.cs - About 1 day to fix

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

              protected virtual string ExpectedActualMessage(string premessage, string preExpected, object expected, string postExpected, string preActual, object actual, string postActual)
      Severity: Major
      Found in Edison.Framework/Asserts/Assert.cs - About 50 mins to fix

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

                public virtual IAssert ExpectUrl(IBrowser browser, string expectedUrl, int attempts = 10, bool startsWith = false, string message = null)
        Severity: Minor
        Found in Edison.Framework/Asserts/Assert.cs - About 35 mins to fix

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

                  public virtual IAssert ExpectElement(IBrowser browser, HtmlIdentifierType identifierType, string expectedIdentifier, int attempts = 10, string message = null)
          Severity: Minor
          Found in Edison.Framework/Asserts/Assert.cs - About 35 mins to fix

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

                    public virtual IAssert AreTimesEqual(TimeSpan expected, TimeSpan actual, TimeSpan offset = default(TimeSpan), string message = null)
                    {
                        if (offset != default(TimeSpan))
                        {
                            IsBetween(actual, expected.Subtract(offset), expected.Add(offset), message);
            Severity: Major
            Found in Edison.Framework/Asserts/Assert.cs and 1 other location - About 1 hr to fix
            Edison.Framework/Asserts/Assert.cs on lines 509..521

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

            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

                    public virtual IAssert AreTimesNotEqual(TimeSpan expected, TimeSpan actual, TimeSpan offset = default(TimeSpan), string message = null)
                    {
                        if (offset != default(TimeSpan))
                        {
                            IsNotBetween(actual, expected.Subtract(offset), expected.Add(offset), message);
            Severity: Major
            Found in Edison.Framework/Asserts/Assert.cs and 1 other location - About 1 hr to fix
            Edison.Framework/Asserts/Assert.cs on lines 495..507

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

            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

                    public virtual IAssert AreDatesNotEqual(DateTime expected, DateTime actual, int minuteOffset = 0, string message = null)
                    {
                        if (minuteOffset != 0)
                        {
                            IsNotBetween(actual, expected.AddMinutes(-minuteOffset), expected.AddMinutes(minuteOffset), message);
            Severity: Major
            Found in Edison.Framework/Asserts/Assert.cs and 1 other location - About 1 hr to fix
            Edison.Framework/Asserts/Assert.cs on lines 463..475

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

            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

                    public virtual IAssert AreDatesEqual(DateTime expected, DateTime actual, int minuteOffset = 0, string message = null)
                    {
                        if (minuteOffset != 0)
                        {
                            IsBetween(actual, expected.AddMinutes(-minuteOffset), expected.AddMinutes(minuteOffset), message);
            Severity: Major
            Found in Edison.Framework/Asserts/Assert.cs and 1 other location - About 1 hr to fix
            Edison.Framework/Asserts/Assert.cs on lines 477..489

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

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

                    public virtual IAssert IsLessThanOrEqual(IComparable value, IComparable lessThanOrEqualToThis, string message = null)
                    {
                        if (value == null || value.CompareTo(lessThanOrEqualToThis) > 0)
                        {
                            throw new AssertException(ExpectedActualMessage(message, "Less than or equal to ", lessThanOrEqualToThis, null, null, value, null));
            Severity: Major
            Found in Edison.Framework/Asserts/Assert.cs and 7 other locations - About 50 mins to fix
            Edison.Framework/Asserts/Assert.cs on lines 231..239
            Edison.Framework/Asserts/Assert.cs on lines 241..249
            Edison.Framework/Asserts/Assert.cs on lines 251..259
            Edison.Framework/Asserts/Assert.cs on lines 261..269
            Edison.Framework/Asserts/Assert.cs on lines 275..283
            Edison.Framework/Asserts/Assert.cs on lines 295..303
            Edison.Framework/Asserts/Assert.cs on lines 305..313

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

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

                    public virtual IAssert IsGreaterThan(IComparable value, IComparable greaterThanThis, string message = null)
                    {
                        if (value == null || value.CompareTo(greaterThanThis) <= 0)
                        {
                            throw new AssertException(ExpectedActualMessage(message, "Greater than ", greaterThanThis, null, null, value, null));
            Severity: Major
            Found in Edison.Framework/Asserts/Assert.cs and 7 other locations - About 50 mins to fix
            Edison.Framework/Asserts/Assert.cs on lines 241..249
            Edison.Framework/Asserts/Assert.cs on lines 251..259
            Edison.Framework/Asserts/Assert.cs on lines 261..269
            Edison.Framework/Asserts/Assert.cs on lines 275..283
            Edison.Framework/Asserts/Assert.cs on lines 285..293
            Edison.Framework/Asserts/Assert.cs on lines 295..303
            Edison.Framework/Asserts/Assert.cs on lines 305..313

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

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

                    public virtual IAssert IsGreaterThanOrEqual(IComparable value, IComparable greaterThanOrEqualToThis, string message = null)
                    {
                        if (value == null || value.CompareTo(greaterThanOrEqualToThis) < 0)
                        {
                            throw new AssertException(ExpectedActualMessage(message, "Greater than or equal to ", greaterThanOrEqualToThis, null, null, value, null));
            Severity: Major
            Found in Edison.Framework/Asserts/Assert.cs and 7 other locations - About 50 mins to fix
            Edison.Framework/Asserts/Assert.cs on lines 231..239
            Edison.Framework/Asserts/Assert.cs on lines 251..259
            Edison.Framework/Asserts/Assert.cs on lines 261..269
            Edison.Framework/Asserts/Assert.cs on lines 275..283
            Edison.Framework/Asserts/Assert.cs on lines 285..293
            Edison.Framework/Asserts/Assert.cs on lines 295..303
            Edison.Framework/Asserts/Assert.cs on lines 305..313

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

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

                    public virtual IAssert IsNotGreaterThan(IComparable value, IComparable notGreaterThanThis, string message = null)
                    {
                        if (value == null || value.CompareTo(notGreaterThanThis) > 0)
                        {
                            throw new AssertException(ExpectedActualMessage(message, "Less than or equal to ", notGreaterThanThis, null, null, value, null));
            Severity: Major
            Found in Edison.Framework/Asserts/Assert.cs and 7 other locations - About 50 mins to fix
            Edison.Framework/Asserts/Assert.cs on lines 231..239
            Edison.Framework/Asserts/Assert.cs on lines 241..249
            Edison.Framework/Asserts/Assert.cs on lines 261..269
            Edison.Framework/Asserts/Assert.cs on lines 275..283
            Edison.Framework/Asserts/Assert.cs on lines 285..293
            Edison.Framework/Asserts/Assert.cs on lines 295..303
            Edison.Framework/Asserts/Assert.cs on lines 305..313

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

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

                    public virtual IAssert IsNotGreaterThanOrEqual(IComparable value, IComparable notGreaterThanOrEqualToThis, string message = null)
                    {
                        if (value == null || value.CompareTo(notGreaterThanOrEqualToThis) >= 0)
                        {
                            throw new AssertException(ExpectedActualMessage(message, "Less than ", notGreaterThanOrEqualToThis, null, null, value, null));
            Severity: Major
            Found in Edison.Framework/Asserts/Assert.cs and 7 other locations - About 50 mins to fix
            Edison.Framework/Asserts/Assert.cs on lines 231..239
            Edison.Framework/Asserts/Assert.cs on lines 241..249
            Edison.Framework/Asserts/Assert.cs on lines 251..259
            Edison.Framework/Asserts/Assert.cs on lines 275..283
            Edison.Framework/Asserts/Assert.cs on lines 285..293
            Edison.Framework/Asserts/Assert.cs on lines 295..303
            Edison.Framework/Asserts/Assert.cs on lines 305..313

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

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

                    public virtual IAssert IsLessThan(IComparable value, IComparable lessThanThis, string message = null)
                    {
                        if (value == null || value.CompareTo(lessThanThis) >= 0)
                        {
                            throw new AssertException(ExpectedActualMessage(message, "Less than ", lessThanThis, null, null, value, null));
            Severity: Major
            Found in Edison.Framework/Asserts/Assert.cs and 7 other locations - About 50 mins to fix
            Edison.Framework/Asserts/Assert.cs on lines 231..239
            Edison.Framework/Asserts/Assert.cs on lines 241..249
            Edison.Framework/Asserts/Assert.cs on lines 251..259
            Edison.Framework/Asserts/Assert.cs on lines 261..269
            Edison.Framework/Asserts/Assert.cs on lines 285..293
            Edison.Framework/Asserts/Assert.cs on lines 295..303
            Edison.Framework/Asserts/Assert.cs on lines 305..313

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

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

                    public virtual IAssert IsNotLessThan(IComparable value, IComparable notLessThanThis, string message = null)
                    {
                        if (value == null || value.CompareTo(notLessThanThis) < 0)
                        {
                            throw new AssertException(ExpectedActualMessage(message, "Greater than or equal to ", notLessThanThis, null, null, value, null));
            Severity: Major
            Found in Edison.Framework/Asserts/Assert.cs and 7 other locations - About 50 mins to fix
            Edison.Framework/Asserts/Assert.cs on lines 231..239
            Edison.Framework/Asserts/Assert.cs on lines 241..249
            Edison.Framework/Asserts/Assert.cs on lines 251..259
            Edison.Framework/Asserts/Assert.cs on lines 261..269
            Edison.Framework/Asserts/Assert.cs on lines 275..283
            Edison.Framework/Asserts/Assert.cs on lines 285..293
            Edison.Framework/Asserts/Assert.cs on lines 305..313

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

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

                    public virtual IAssert IsNotLessThanOrEqual(IComparable value, IComparable notLessThanOrEqualToThis, string message = null)
                    {
                        if (value == null || value.CompareTo(notLessThanOrEqualToThis) <= 0)
                        {
                            throw new AssertException(ExpectedActualMessage(message, "Greater than ", notLessThanOrEqualToThis, null, null, value, null));
            Severity: Major
            Found in Edison.Framework/Asserts/Assert.cs and 7 other locations - About 50 mins to fix
            Edison.Framework/Asserts/Assert.cs on lines 231..239
            Edison.Framework/Asserts/Assert.cs on lines 241..249
            Edison.Framework/Asserts/Assert.cs on lines 251..259
            Edison.Framework/Asserts/Assert.cs on lines 261..269
            Edison.Framework/Asserts/Assert.cs on lines 275..283
            Edison.Framework/Asserts/Assert.cs on lines 285..293
            Edison.Framework/Asserts/Assert.cs on lines 295..303

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

            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

                    public virtual IAssert DoesContain(string value, string containsThis, string message = null)
                    {
                        if (value == null || !value.Contains(containsThis))
                        {
                            throw new AssertException(ExpectedActualMessage(message, "Contains '", containsThis, "'", null, value, null));
            Severity: Major
            Found in Edison.Framework/Asserts/Assert.cs and 2 other locations - About 50 mins to fix
            Edison.Framework/Asserts/Assert.cs on lines 619..627
            Edison.Framework/Asserts/Assert.cs on lines 643..651

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

            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

                    public virtual IAssert EndsWith(string value, string endsWithThis, string message = null)
                    {
                        if (value == null || !value.EndsWith(endsWithThis))
                        {
                            throw new AssertException(ExpectedActualMessage(message, "End with '", endsWithThis, "'", null, value, null));
            Severity: Major
            Found in Edison.Framework/Asserts/Assert.cs and 2 other locations - About 50 mins to fix
            Edison.Framework/Asserts/Assert.cs on lines 551..559
            Edison.Framework/Asserts/Assert.cs on lines 619..627

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

            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

                    public virtual IAssert StartsWith(string value, string startsWithThis, string message = null)
                    {
                        if (value == null || !value.StartsWith(startsWithThis))
                        {
                            throw new AssertException(ExpectedActualMessage(message, "Starts with '", startsWithThis, "'", null, value, null));
            Severity: Major
            Found in Edison.Framework/Asserts/Assert.cs and 2 other locations - About 50 mins to fix
            Edison.Framework/Asserts/Assert.cs on lines 551..559
            Edison.Framework/Asserts/Assert.cs on lines 643..651

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

            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

                    public virtual IAssert DoesNotStartWith(string value, string doesNotStartsWithThis, string message = null)
                    {
                        if (value != null && value.StartsWith(doesNotStartsWithThis))
                        {
                            throw new AssertException(ExpectedActualMessage(message, "Does not start with '", doesNotStartsWithThis, "'", null, value, null));
            Severity: Major
            Found in Edison.Framework/Asserts/Assert.cs and 2 other locations - About 50 mins to fix
            Edison.Framework/Asserts/Assert.cs on lines 561..569
            Edison.Framework/Asserts/Assert.cs on lines 653..661

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

            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

                    public virtual IAssert DoesNotEndWith(string value, string doesNotEndsWithThis, string message = null)
                    {
                        if (value != null && value.EndsWith(doesNotEndsWithThis))
                        {
                            throw new AssertException(ExpectedActualMessage(message, "Does not end with '", doesNotEndsWithThis, "'", null, value, null));
            Severity: Major
            Found in Edison.Framework/Asserts/Assert.cs and 2 other locations - About 50 mins to fix
            Edison.Framework/Asserts/Assert.cs on lines 561..569
            Edison.Framework/Asserts/Assert.cs on lines 629..637

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

            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

                    public virtual IAssert DoesNotContain(string value, string doesNotContainThis, string message = null)
                    {
                        if (value != null && value.Contains(doesNotContainThis))
                        {
                            throw new AssertException(ExpectedActualMessage(message, "Does not contain '", doesNotContainThis, "'", null, value, null));
            Severity: Major
            Found in Edison.Framework/Asserts/Assert.cs and 2 other locations - About 50 mins to fix
            Edison.Framework/Asserts/Assert.cs on lines 629..637
            Edison.Framework/Asserts/Assert.cs on lines 653..661

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

            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

                    public virtual IAssert FileExists(string path, string message = null)
                    {
                        if (!File.Exists(path))
                        {
                            throw new AssertException(ExpectedActualMessage(message, "File exists: ", path, null, null, "File does not exist", null));
            Severity: Minor
            Found in Edison.Framework/Asserts/Assert.cs and 1 other location - About 40 mins to fix
            Edison.Framework/Asserts/Assert.cs on lines 343..351

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

            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

                    public virtual IAssert DirectoryExists(string path, string message = null)
                    {
                        if (!Directory.Exists(path))
                        {
                            throw new AssertException(ExpectedActualMessage(message, "Directory exists: ", path, null, null, "Directory does not exist", null));
            Severity: Minor
            Found in Edison.Framework/Asserts/Assert.cs and 1 other location - About 40 mins to fix
            Edison.Framework/Asserts/Assert.cs on lines 319..327

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

            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

                    public virtual IAssert DirectoryDoesNotExists(string path, string message = null)
                    {
                        if (Directory.Exists(path))
                        {
                            throw new AssertException(ExpectedActualMessage(message, "Directory does not exists: ", path, null, null, "Directory exists", null));
            Severity: Minor
            Found in Edison.Framework/Asserts/Assert.cs and 1 other location - About 40 mins to fix
            Edison.Framework/Asserts/Assert.cs on lines 329..337

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

            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

                    public virtual IAssert FileDoesNotExist(string path, string message = null)
                    {
                        if (File.Exists(path))
                        {
                            throw new AssertException(ExpectedActualMessage(message, "File does not exist: ", path, null, null, "File exists", null));
            Severity: Minor
            Found in Edison.Framework/Asserts/Assert.cs and 1 other location - About 40 mins to fix
            Edison.Framework/Asserts/Assert.cs on lines 353..361

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

            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

                        {
                            if (count >= attempts)
                            {
                                throw new AssertException(ExpectedActualMessage(message, null, expectedValue, null, "Value not found at: ", browser.URL, null));
                            }
            Severity: Minor
            Found in Edison.Framework/Asserts/Assert.cs and 1 other location - About 35 mins to fix
            Edison.Framework/Asserts/Assert.cs on lines 750..758

            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

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

                        {
                            if (count >= attempts)
                            {
                                throw new AssertException(ExpectedActualMessage(message, null, expectedUrl, null, null, browser.URL, null));
                            }
            Severity: Minor
            Found in Edison.Framework/Asserts/Assert.cs and 1 other location - About 35 mins to fix
            Edison.Framework/Asserts/Assert.cs on lines 790..798

            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

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

                        {
                            throw new AssertException(ExpectedActualMessage(message, "Not between ", Safeguard(lowerBound, "NULL") + " and " + Safeguard(upperBound, "NULL"), null, null, value, null));
                        }
            Severity: Minor
            Found in Edison.Framework/Asserts/Assert.cs and 1 other location - About 35 mins to fix
            Edison.Framework/Asserts/Assert.cs on lines 530..532

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

            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

                        {
                            throw new AssertException(ExpectedActualMessage(message, "Between ", Safeguard(lowerBound, "NULL") + " and " + Safeguard(upperBound, "NULL"), null, null, value, null));
                        }
            Severity: Minor
            Found in Edison.Framework/Asserts/Assert.cs and 1 other location - About 35 mins to fix
            Edison.Framework/Asserts/Assert.cs on lines 540..542

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

            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