diff --git a/app/src/main/java/org/dhis2/usescases/teiDashboard/TeiDashboardMobileActivity.kt b/app/src/main/java/org/dhis2/usescases/teiDashboard/TeiDashboardMobileActivity.kt index b3bc9624c5..07b9fc050f 100644 --- a/app/src/main/java/org/dhis2/usescases/teiDashboard/TeiDashboardMobileActivity.kt +++ b/app/src/main/java/org/dhis2/usescases/teiDashboard/TeiDashboardMobileActivity.kt @@ -97,7 +97,6 @@ class TeiDashboardMobileActivity : private val detailsLauncher = registerForActivityResult( ActivityResultContracts.StartActivityForResult(), ) { - } private val teiProgramListLauncher = registerForActivityResult( diff --git a/app/src/main/java/org/dhis2/usescases/teiDashboard/dashboardfragments/teidata/TEIDataPresenter.kt b/app/src/main/java/org/dhis2/usescases/teiDashboard/dashboardfragments/teidata/TEIDataPresenter.kt index 6bd946c0ac..5c012d7235 100644 --- a/app/src/main/java/org/dhis2/usescases/teiDashboard/dashboardfragments/teidata/TEIDataPresenter.kt +++ b/app/src/main/java/org/dhis2/usescases/teiDashboard/dashboardfragments/teidata/TEIDataPresenter.kt @@ -303,7 +303,6 @@ class TEIDataPresenter( val intent = Intent(view.context, ProgramStageSelectionActivity::class.java) intent.putExtras(bundle) contractHandler.createEvent(intent).observe(view.viewLifecycleOwner()) { - } } diff --git a/app/src/test/java/org/dhis2/usescases/teiDashboard/DashboardRepositoryImplTest.kt b/app/src/test/java/org/dhis2/usescases/teiDashboard/DashboardRepositoryImplTest.kt index 040d51f9b3..29877e9362 100644 --- a/app/src/test/java/org/dhis2/usescases/teiDashboard/DashboardRepositoryImplTest.kt +++ b/app/src/test/java/org/dhis2/usescases/teiDashboard/DashboardRepositoryImplTest.kt @@ -44,7 +44,7 @@ class DashboardRepositoryImplTest { "programUid", "enrollmentUid", teiAttributesProvider, - preferences + preferences, ) } diff --git a/app/src/test/java/org/dhis2/usescases/teiDashboard/TeiDashboardPresenterTest.kt b/app/src/test/java/org/dhis2/usescases/teiDashboard/TeiDashboardPresenterTest.kt index f8d499c3b2..3fb3f0488a 100644 --- a/app/src/test/java/org/dhis2/usescases/teiDashboard/TeiDashboardPresenterTest.kt +++ b/app/src/test/java/org/dhis2/usescases/teiDashboard/TeiDashboardPresenterTest.kt @@ -1,20 +1,16 @@ package org.dhis2.usescases.teiDashboard -import com.google.gson.reflect.TypeToken import io.reactivex.Flowable import io.reactivex.Observable import io.reactivex.Single import org.dhis2.commons.data.tuples.Pair import org.dhis2.commons.filters.FilterManager import org.dhis2.commons.matomo.MatomoAnalyticsController -import org.dhis2.commons.prefs.Preference.Companion.GROUPING import org.dhis2.commons.prefs.PreferenceProvider import org.dhis2.commons.schedulers.SchedulerProvider import org.dhis2.data.schedulers.TrampolineSchedulerProvider -import org.dhis2.utils.AuthorityException import org.dhis2.utils.analytics.AnalyticsHelper import org.dhis2.utils.analytics.CLICK -import org.dhis2.utils.analytics.DELETE_ENROLL import org.dhis2.utils.analytics.DELETE_TEI import org.hisp.dhis.android.core.enrollment.Enrollment import org.hisp.dhis.android.core.enrollment.EnrollmentStatus @@ -22,7 +18,6 @@ import org.hisp.dhis.android.core.event.Event import org.hisp.dhis.android.core.organisationunit.OrganisationUnit import org.hisp.dhis.android.core.program.Program import org.hisp.dhis.android.core.program.ProgramStage -import org.hisp.dhis.android.core.program.ProgramTrackedEntityAttribute import org.hisp.dhis.android.core.trackedentity.TrackedEntityAttribute import org.hisp.dhis.android.core.trackedentity.TrackedEntityAttributeValue import org.hisp.dhis.android.core.trackedentity.TrackedEntityInstance @@ -62,7 +57,6 @@ class TeiDashboardPresenterTest { ) } - @Test fun `Should go to enrollment list when clicked`() { presenter.onEnrollmentSelectorClick() diff --git a/app/src/test/java/org/dhis2/usescases/teiDashboard/dashboardfragments/data/TeiDataPresenterTest.kt b/app/src/test/java/org/dhis2/usescases/teiDashboard/dashboardfragments/data/TeiDataPresenterTest.kt index 12b8a8e3c2..802d0bef87 100644 --- a/app/src/test/java/org/dhis2/usescases/teiDashboard/dashboardfragments/data/TeiDataPresenterTest.kt +++ b/app/src/test/java/org/dhis2/usescases/teiDashboard/dashboardfragments/data/TeiDataPresenterTest.kt @@ -10,9 +10,6 @@ import org.dhis2.commons.bindings.canCreateEventInEnrollment import org.dhis2.commons.bindings.enrollment import org.dhis2.commons.data.EventViewModel import org.dhis2.commons.data.EventViewModelType -import org.dhis2.commons.filters.FilterManager -import org.dhis2.commons.filters.data.FilterRepository -import org.dhis2.commons.prefs.PreferenceProvider import org.dhis2.commons.resources.ResourceManager import org.dhis2.data.forms.dataentry.RuleEngineRepository import org.dhis2.data.schedulers.TrampolineSchedulerProvider @@ -99,7 +96,7 @@ class TeiDataPresenterTest { ) } - private fun mockEnrollmentOrgUnitInCaptureScope(returnValue:Boolean){ + private fun mockEnrollmentOrgUnitInCaptureScope(returnValue: Boolean) { whenever( d2.organisationUnitModule().organisationUnits(), ) doReturn mock() @@ -170,7 +167,7 @@ class TeiDataPresenterTest { val contractLiveData = MutableLiveData() whenever(view.viewLifecycleOwner()) doReturn lifecycleOwner whenever(teiDataContractHandler.createEvent(any())) doReturn contractLiveData - val mockedEnrollment:Enrollment = mock { + val mockedEnrollment: Enrollment = mock { on { organisationUnit() } doReturn "orgUnitUid" } whenever(teiDataRepository.getEnrollment())doReturn Single.just(mockedEnrollment) diff --git a/app/src/test/java/org/dhis2/usescases/teiDashboard/ui/mapper/InfoBarMapperTest.kt b/app/src/test/java/org/dhis2/usescases/teiDashboard/ui/mapper/InfoBarMapperTest.kt index 2d4153c067..5f69b3e0e3 100644 --- a/app/src/test/java/org/dhis2/usescases/teiDashboard/ui/mapper/InfoBarMapperTest.kt +++ b/app/src/test/java/org/dhis2/usescases/teiDashboard/ui/mapper/InfoBarMapperTest.kt @@ -4,7 +4,6 @@ import org.dhis2.R import org.dhis2.commons.data.tuples.Pair import org.dhis2.commons.resources.ResourceManager import org.dhis2.usescases.teiDashboard.DashboardEnrollmentModel -import org.dhis2.usescases.teiDashboard.DashboardProgramModel import org.dhis2.usescases.teiDashboard.ui.model.InfoBarType import org.hisp.dhis.android.core.common.State import org.hisp.dhis.android.core.enrollment.Enrollment @@ -105,7 +104,7 @@ class InfoBarMapperTest { setPrograms(), emptyList(), null, - null + null, ) return model diff --git a/app/src/test/java/org/dhis2/usescases/teiDashboard/ui/mapper/TEIDetailMapperTest.kt b/app/src/test/java/org/dhis2/usescases/teiDashboard/ui/mapper/TEIDetailMapperTest.kt index 65d4825dc6..e528da037f 100644 --- a/app/src/test/java/org/dhis2/usescases/teiDashboard/ui/mapper/TEIDetailMapperTest.kt +++ b/app/src/test/java/org/dhis2/usescases/teiDashboard/ui/mapper/TEIDetailMapperTest.kt @@ -44,7 +44,7 @@ class TEIDetailMapperTest { programsCallback = {}, onImageClick = {}, - ) + ) assertEquals(result.title, model.teiHeader) assertEquals(result.additionalInfo[0].value, model.trackedEntityAttributes[0].second.value())