davidmigloz/go-bees

View on GitHub
app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java

Summary

Maintainability
B
5 hrs
Test Coverage

Method addRecordingTest has 60 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Test
    public void addRecordingTest() {
        ViewInteraction floatingActionButton = onView(
                allOf(withId(R.id.fab_add_apiary),
                        withParent(withId(R.id.coordinatorLayout)),

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

        private static Matcher<View> childAtPosition(
                final Matcher<View> parentMatcher, final int position) {
    
            return new TypeSafeMatcher<View>() {
                @Override
    app/src/androidTest/java/com/davidmiguel/gobees/about/AboutTest.java on lines 60..77
    app/src/androidTest/java/com/davidmiguel/gobees/apiaries/AddApiaryTest.java on lines 62..79
    app/src/androidTest/java/com/davidmiguel/gobees/apiaries/DeleteApiaryTest.java on lines 64..81
    app/src/androidTest/java/com/davidmiguel/gobees/apiaries/EditApiaryTest.java on lines 63..80
    app/src/androidTest/java/com/davidmiguel/gobees/apiaries/ViewApiaryTest.java on lines 64..81
    app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 63..80
    app/src/androidTest/java/com/davidmiguel/gobees/apiary/DeleteHiveTest.java on lines 65..82
    app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 64..81
    app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 64..81
    app/src/androidTest/java/com/davidmiguel/gobees/help/HelpTest.java on lines 60..77
    app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 61..78
    app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 64..81
    app/src/androidTest/java/com/davidmiguel/gobees/settings/SettingsTest.java on lines 62..79

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

            ViewInteraction frameLayout = onView(
                    allOf(withId(R.id.card),
                            childAtPosition(
                                    allOf(withId(R.id.recordings_list),
                                            childAtPosition(
    app/src/androidTest/java/com/davidmiguel/gobees/apiaries/DeleteApiaryTest.java on lines 119..127
    app/src/androidTest/java/com/davidmiguel/gobees/apiary/DeleteHiveTest.java on lines 133..141
    app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 114..122
    app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 125..133
    app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 136..144

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

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

            ViewInteraction recyclerView = onView(
                    allOf(withId(R.id.apiaries_list),
                            withParent(allOf(withId(R.id.apiariesLL),
                                    withParent(withId(R.id.apiariesContainer)))),
                            isDisplayed()));
    app/src/androidTest/java/com/davidmiguel/gobees/apiaries/ViewApiaryTest.java on lines 105..109
    app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 100..104
    app/src/androidTest/java/com/davidmiguel/gobees/apiary/DeleteHiveTest.java on lines 102..106
    app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 101..105
    app/src/androidTest/java/com/davidmiguel/gobees/apiary/ListHivesTest.java on lines 72..76
    app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 101..105
    app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 128..132
    app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java on lines 124..128
    app/src/androidTest/java/com/davidmiguel/gobees/hive/DeleteRecordingTest.java on lines 78..82
    app/src/androidTest/java/com/davidmiguel/gobees/hive/DeleteRecordingTest.java on lines 101..105
    app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 100..104
    app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 107..111
    app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 101..105
    app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 124..128
    app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 147..151

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

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

            ViewInteraction recyclerView2 = onView(
                    allOf(withId(R.id.hives_list),
                            withParent(allOf(withId(R.id.hivesLL),
                                    withParent(withId(R.id.hivesContainer)))),
                            isDisplayed()));
    app/src/androidTest/java/com/davidmiguel/gobees/apiaries/ViewApiaryTest.java on lines 105..109
    app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 100..104
    app/src/androidTest/java/com/davidmiguel/gobees/apiary/DeleteHiveTest.java on lines 102..106
    app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 101..105
    app/src/androidTest/java/com/davidmiguel/gobees/apiary/ListHivesTest.java on lines 72..76
    app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 101..105
    app/src/androidTest/java/com/davidmiguel/gobees/apiary/ViewHiveTest.java on lines 128..132
    app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java on lines 101..105
    app/src/androidTest/java/com/davidmiguel/gobees/hive/DeleteRecordingTest.java on lines 78..82
    app/src/androidTest/java/com/davidmiguel/gobees/hive/DeleteRecordingTest.java on lines 101..105
    app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 100..104
    app/src/androidTest/java/com/davidmiguel/gobees/hive/ListRecordingsTest.java on lines 107..111
    app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 101..105
    app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 124..128
    app/src/androidTest/java/com/davidmiguel/gobees/hive/ViewRecordingTest.java on lines 147..151

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

    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

    Member name 'mActivityTestRule' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.
    Open

        public ActivityTestRule<SplashActivity> mActivityTestRule

    There are no issues that match your filters.

    Category
    Status