basbeu/theSofties

View on GitHub
app/src/androidTest/java/ch/epfl/sweng/favors/utils/UtilsTest.java

Summary

Maintainability
A
0 mins
Test Coverage

UtilsTest has 24 methods (exceeds 20 allowed). Consider refactoring.
Wontfix

@RunWith(AndroidJUnit4.class)
public class UtilsTest {

    final static long DAY = 86400000;

Severity: Minor
Found in app/src/androidTest/java/ch/epfl/sweng/favors/utils/UtilsTest.java - About 2 hrs to fix

    Similar blocks of code found in 4 locations. Consider refactoring.
    Wontfix

        @Test
        public void passwordWithoutRequirements(){
            String p1 = "meoaeJAi";
            String p2 = "ksjd73jd93ppdl28sj2i8";
            String p3 = "17384938";
    app/src/androidTest/java/ch/epfl/sweng/favors/utils/UtilsTest.java on lines 88..99
    app/src/androidTest/java/ch/epfl/sweng/favors/utils/UtilsTest.java on lines 101..113
    app/src/androidTest/java/ch/epfl/sweng/favors/utils/UtilsTest.java on lines 115..127

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

    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 4 locations. Consider refactoring.
    Wontfix

        @Test
        public void invalidEmail(){
            String e1 = "email@toto";
            String e2 = "toto.gmail.com";
            String e3 = ".com@totogmail";
    app/src/androidTest/java/ch/epfl/sweng/favors/utils/UtilsTest.java on lines 88..99
    app/src/androidTest/java/ch/epfl/sweng/favors/utils/UtilsTest.java on lines 115..127
    app/src/androidTest/java/ch/epfl/sweng/favors/utils/UtilsTest.java on lines 129..141

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

    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 4 locations. Consider refactoring.
    Wontfix

        @Test
        public void passwordWithRequirements(){
            String p1 = "hsj26u3J";
            String p2 = "HPAkdj7wu";
            String p3 = "92ksjd73jd99sjaksjdu";
    app/src/androidTest/java/ch/epfl/sweng/favors/utils/UtilsTest.java on lines 88..99
    app/src/androidTest/java/ch/epfl/sweng/favors/utils/UtilsTest.java on lines 101..113
    app/src/androidTest/java/ch/epfl/sweng/favors/utils/UtilsTest.java on lines 129..141

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

    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 4 locations. Consider refactoring.
    Wontfix

        @Test
        public void validEmail(){
            String e1 = "toto@email.com";
            String e2 = "toto@gmail.ch";
            String e3 = "tata@hotmail.fr";
    app/src/androidTest/java/ch/epfl/sweng/favors/utils/UtilsTest.java on lines 101..113
    app/src/androidTest/java/ch/epfl/sweng/favors/utils/UtilsTest.java on lines 115..127
    app/src/androidTest/java/ch/epfl/sweng/favors/utils/UtilsTest.java on lines 129..141

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

    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 4 locations. Consider refactoring.
    Wontfix

        @Test
        public void containsDigitWithDigit(){
            String s1 = "swijdew8wqd";
            String s2 = "JshdiAAAi9";
            String s3 = "9swijdewwqd";
    app/src/androidTest/java/ch/epfl/sweng/favors/utils/UtilsTest.java on lines 35..46
    app/src/androidTest/java/ch/epfl/sweng/favors/utils/UtilsTest.java on lines 48..59
    app/src/androidTest/java/ch/epfl/sweng/favors/utils/UtilsTest.java on lines 74..86

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

    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 4 locations. Consider refactoring.
    Wontfix

        @Test
        public void containsCharWithChar(){
            String s1 = "1763h";
            String s2 = "A83739";
            String s3 = "JsiWOskAP";
    app/src/androidTest/java/ch/epfl/sweng/favors/utils/UtilsTest.java on lines 35..46
    app/src/androidTest/java/ch/epfl/sweng/favors/utils/UtilsTest.java on lines 61..72
    app/src/androidTest/java/ch/epfl/sweng/favors/utils/UtilsTest.java on lines 74..86

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

    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 4 locations. Consider refactoring.
    Wontfix

        @Test
        public void containsDigitWithNoDigit(){
            String s1 = "ijaszwjwd";
            String s2 = "a";
            String s3 = "LLAksjdeU";
    app/src/androidTest/java/ch/epfl/sweng/favors/utils/UtilsTest.java on lines 35..46
    app/src/androidTest/java/ch/epfl/sweng/favors/utils/UtilsTest.java on lines 48..59
    app/src/androidTest/java/ch/epfl/sweng/favors/utils/UtilsTest.java on lines 61..72

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

    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 4 locations. Consider refactoring.
    Wontfix

        @Test
        public void containsCharWithNoChar(){
            String s1 = "12347226";
            String s2 = "4";
            String s3 = "00002900";
    app/src/androidTest/java/ch/epfl/sweng/favors/utils/UtilsTest.java on lines 48..59
    app/src/androidTest/java/ch/epfl/sweng/favors/utils/UtilsTest.java on lines 61..72
    app/src/androidTest/java/ch/epfl/sweng/favors/utils/UtilsTest.java on lines 74..86

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

    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