davidmigloz/go-bees

View on GitHub
app/src/androidTest/java/com/davidmiguel/gobees/apiaries/DeleteApiaryTest.java

Summary

Maintainability
A
3 hrs
Test Coverage

Method deleteApiaryTest has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Test
    public void deleteApiaryTest() {
        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/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/AddRecordingTest.java on lines 64..81
    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.apiaries_list),
                                            childAtPosition(
    app/src/androidTest/java/com/davidmiguel/gobees/apiary/DeleteHiveTest.java on lines 133..141
    app/src/androidTest/java/com/davidmiguel/gobees/hive/AddRecordingTest.java on lines 147..155
    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

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

            ViewInteraction textView = onView(
                    allOf(withId(R.id.apiary_name), withText("Apiary"),
                            childAtPosition(
                                    childAtPosition(
                                            withId(R.id.card),
    app/src/androidTest/java/com/davidmiguel/gobees/apiaries/AddApiaryTest.java on lines 103..110
    app/src/androidTest/java/com/davidmiguel/gobees/apiaries/AddApiaryTest.java on lines 113..120
    app/src/androidTest/java/com/davidmiguel/gobees/apiaries/EditApiaryTest.java on lines 122..129
    app/src/androidTest/java/com/davidmiguel/gobees/apiary/AddHiveTest.java on lines 123..130
    app/src/androidTest/java/com/davidmiguel/gobees/apiary/EditHiveTest.java on lines 146..153

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

    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