File tree Expand file tree Collapse file tree
src/test/kotlin/com/vrem/wifianalyzer/wifi Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Build Properties
2- # Thu Jan 01 12:10:30 EST 2026
3- version_build =41
2+ # Thu Jan 01 14:06:26 EST 2026
3+ version_build =42
44version_major =3
55version_minor =2
66version_patch =1
Original file line number Diff line number Diff line change @@ -73,11 +73,11 @@ def jacocoCoverageVerificationProvider = tasks.register('jacocoTestCoverageVerif
7373 }
7474 limit {
7575 counter = ' BRANCH'
76- minimum = 0.94
76+ minimum = 0.95
7777 }
7878 limit {
7979 counter = ' COMPLEXITY'
80- minimum = 0.95
80+ minimum = 0.96
8181 }
8282 limit {
8383 counter = ' LINE'
Original file line number Diff line number Diff line change @@ -223,6 +223,25 @@ class AccessPointsAdapterGroupTest {
223223 verify(expandableListAdapter).groupCount
224224 }
225225
226+ @Test
227+ fun updateExpandsGroupWhenInExpandedSet () {
228+ // setup
229+ val wiFiDetails = withWiFiDetails()
230+ doReturn(GroupBy .CHANNEL ).whenever(settings).groupBy()
231+ fixture.updateGroupBy()
232+ fixture.expanded.add(GroupBy .CHANNEL .group(wiFiDetails[0 ]))
233+ doReturn(expandableListAdapter).whenever(expandableListView).expandableListAdapter
234+ doReturn(wiFiDetails.size).whenever(expandableListAdapter).groupCount
235+ // execute
236+ fixture.update(wiFiDetails, expandableListView)
237+ // validate
238+ verify(settings, times(2 )).groupBy()
239+ verify(expandableListView).expandableListAdapter
240+ verify(expandableListAdapter).groupCount
241+ verify(expandableListView).expandGroup(0 )
242+ verify(expandableListView, times(2 )).collapseGroup(any())
243+ }
244+
226245 @Test
227246 fun onGroupCollapsedDoesNotRemoveIfHasChildren () {
228247 // setup
Original file line number Diff line number Diff line change @@ -35,8 +35,10 @@ import org.junit.After
3535import org.junit.Before
3636import org.junit.Test
3737import org.junit.runner.RunWith
38+ import org.mockito.kotlin.doReturn
3839import org.mockito.kotlin.never
3940import org.mockito.kotlin.verify
41+ import org.mockito.kotlin.whenever
4042import org.robolectric.Shadows
4143import org.robolectric.annotation.Config
4244
@@ -240,4 +242,16 @@ class FilterTest {
240242 // validate
241243 assertThat(fixture.alertDialog!! .isShowing).isTrue
242244 }
245+
246+ @Test
247+ fun buildReturnsNullDialogWhenActivityIsFinishing () {
248+ // setup
249+ val mainActivity = MainContextHelper .INSTANCE .mainActivity
250+ doReturn(true ).whenever(mainActivity).isFinishing
251+ // execute
252+ val actual = build()
253+ // validate
254+ assertThat(actual.alertDialog).isNull()
255+ verify(mainActivity).isFinishing
256+ }
243257}
You can’t perform that action at this time.
0 commit comments