Skip to content

Commit 7238c3a

Browse files
Update dependencies
1 parent db65250 commit 7238c3a

5 files changed

Lines changed: 52 additions & 27 deletions

File tree

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ dependencies {
4747
testImplementation 'androidx.test.ext:junit:1.2.1'
4848
testImplementation 'com.googlecode.junit-toolbox:junit-toolbox:2.4'
4949
testImplementation 'junit:junit:4.13.2'
50-
testImplementation 'org.mockito:mockito-core:5.16.1'
50+
testImplementation 'org.mockito:mockito-core:5.17.0'
5151
testImplementation 'org.mockito.kotlin:mockito-kotlin:5.4.0'
5252
testImplementation 'org.robolectric:robolectric:4.14.1'
5353
testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"

app/build.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Build Properties
2-
#Sat Apr 05 08:08:52 EDT 2025
3-
version_build=6
2+
#Sun Apr 06 09:08:26 EDT 2025
3+
version_build=7
44
version_major=3
55
version_minor=2
66
version_patch=0

app/src/test/kotlin/com/vrem/wifianalyzer/wifi/band/WiFiChannelCountryTest.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ class WiFiChannelCountryTest {
6464
@Test
6565
fun countryCode() {
6666
Locale.getAvailableLocales().forEach { locale ->
67+
println("[Code: ${locale.country}]")
6768
assertThat(WiFiChannelCountry(locale).countryCode)
6869
.describedAs("Code: ${locale.country}")
6970
.isEqualTo(locale.country)
@@ -73,6 +74,7 @@ class WiFiChannelCountryTest {
7374
@Test
7475
fun countryName() {
7576
Locale.getAvailableLocales().forEach { locale ->
77+
println("[Code: ${locale.country}]")
7678
val fixture = WiFiChannelCountry(locale)
7779
assertThat(fixture.countryName(Locale.US))
7880
.describedAs("Code: ${locale.country}")
@@ -85,8 +87,9 @@ class WiFiChannelCountryTest {
8587
Locale.getAvailableLocales().forEach { locale ->
8688
val fixture = WiFiChannelCountry(locale)
8789
expectedWiFiBands.forEach { (wiFiBand, expectedWiFiInfo) ->
90+
println("[Code: ${locale.country} | $wiFiBand]")
8891
assertThat(fixture.channels(wiFiBand))
89-
.describedAs("Code: ${locale.country} | ${wiFiBand.name}")
92+
.describedAs("Code: ${locale.country} | $wiFiBand")
9093
.containsExactlyElementsOf(expectedWiFiInfo.expectedRatingChannels(wiFiBand, locale.country))
9194
}
9295
}

app/src/test/kotlin/com/vrem/wifianalyzer/wifi/band/WiFiChannelsTest.kt

Lines changed: 42 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -53,29 +53,32 @@ class WiFiChannelsTest {
5353
@Test
5454
fun inRange() {
5555
fixtures.forEach { (wiFiBand, fixture, expectedWiFiInfo) ->
56-
assertThat(fixture.inRange(expectedWiFiInfo.expectedChannels.first().frequency)).describedAs(wiFiBand.name).isTrue()
57-
assertThat(fixture.inRange(expectedWiFiInfo.expectedChannels.last().frequency)).describedAs(wiFiBand.name).isTrue()
56+
println("[$wiFiBand]")
57+
assertThat(fixture.inRange(expectedWiFiInfo.expectedChannels.first().frequency)).describedAs("$wiFiBand").isTrue()
58+
assertThat(fixture.inRange(expectedWiFiInfo.expectedChannels.last().frequency)).describedAs("$wiFiBand").isTrue()
5859
}
5960
}
6061

6162
@Test
6263
fun notInRange() {
6364
fixtures.forEach { (wiFiBand, fixture, expectedWiFiInfo) ->
65+
println("[$wiFiBand]")
6466
assertThat(fixture.inRange(expectedWiFiInfo.expectedChannels.first().frequency - 1))
65-
.describedAs(wiFiBand.name)
67+
.describedAs("$wiFiBand")
6668
.isFalse()
6769
assertThat(fixture.inRange(expectedWiFiInfo.expectedChannels.last().frequency + 1))
68-
.describedAs(wiFiBand.name)
70+
.describedAs("$wiFiBand")
6971
.isFalse()
7072
}
7173
}
7274

7375
@Test
7476
fun wiFiChannelByFrequencyInRange() {
7577
fixtures.forEach { (wiFiBand, fixture, expectedWiFiInfo) ->
78+
println("[$wiFiBand]")
7679
expectedWiFiInfo.expectedChannels.forEach { expected ->
7780
assertThat(fixture.wiFiChannelByFrequency(expected.frequency))
78-
.describedAs(wiFiBand.name)
81+
.describedAs("$wiFiBand")
7982
.isEqualTo(expected)
8083
}
8184
}
@@ -84,21 +87,23 @@ class WiFiChannelsTest {
8487
@Test
8588
fun wiFiChannelByFrequencyOutOfRange() {
8689
fixtures.forEach { (wiFiBand, fixture, expectedWiFiInfo) ->
90+
println("[$wiFiBand]")
8791
assertThat(fixture.wiFiChannelByFrequency(expectedWiFiInfo.expectedChannels.first().frequency - 1))
88-
.describedAs(wiFiBand.name)
92+
.describedAs("$wiFiBand")
8993
.isEqualTo(WiFiChannel.UNKNOWN)
9094
assertThat(fixture.wiFiChannelByFrequency(expectedWiFiInfo.expectedChannels.last().frequency + 1))
91-
.describedAs(wiFiBand.name)
95+
.describedAs("$wiFiBand")
9296
.isEqualTo(WiFiChannel.UNKNOWN)
9397
}
9498
}
9599

96100
@Test
97101
fun wiFiChannelByChannelInRange() {
98102
fixtures.forEach { (wiFiBand, fixture, expectedWiFiInfo) ->
103+
println("[$wiFiBand]")
99104
expectedWiFiInfo.expectedChannels.forEach { expected ->
100105
assertThat(fixture.wiFiChannelByChannel(expected.channel))
101-
.describedAs(wiFiBand.name)
106+
.describedAs("$wiFiBand")
102107
.isEqualTo(expected)
103108
}
104109
}
@@ -107,23 +112,25 @@ class WiFiChannelsTest {
107112
@Test
108113
fun wiFiChannelByChannelNotInRange() {
109114
fixtures.forEach { (wiFiBand, fixture, expectedWiFiInfo) ->
115+
println("[$wiFiBand]")
110116
assertThat(fixture.wiFiChannelByChannel(expectedWiFiInfo.expectedChannels.first().channel - 1))
111-
.describedAs(wiFiBand.name)
117+
.describedAs("$wiFiBand")
112118
.isEqualTo(WiFiChannel.UNKNOWN)
113119
assertThat(fixture.wiFiChannelByChannel(expectedWiFiInfo.expectedChannels.last().channel + 1))
114-
.describedAs(wiFiBand.name)
120+
.describedAs("$wiFiBand")
115121
.isEqualTo(WiFiChannel.UNKNOWN)
116122
}
117123
}
118124

119125
@Test
120126
fun channelRange() {
121127
fixtures.forEach { (wiFiBand, fixture, expectedWiFiInfo) ->
128+
println("[$wiFiBand]")
122129
assertThat(fixture.channelRange.first)
123-
.describedAs(wiFiBand.name)
130+
.describedAs("$wiFiBand")
124131
.isEqualTo(expectedWiFiInfo.expectedChannels.first())
125132
assertThat(fixture.channelRange.second)
126-
.describedAs(wiFiBand.name)
133+
.describedAs("$wiFiBand")
127134
.isEqualTo(expectedWiFiInfo.expectedChannels.last())
128135
}
129136
}
@@ -132,6 +139,7 @@ class WiFiChannelsTest {
132139
fun activeChannels() {
133140
fixtures.forEach { (wiFiBand, fixture, expectedWiFiInfo) ->
134141
fixture.activeChannels.forEach { (wiFiWidth, wiFiWidthChannels) ->
142+
println("[$wiFiBand $wiFiWidth]")
135143
val expected = expectedWiFiInfo.expectedActiveChannels
136144
.filter { (expectedWiFiWidth) -> expectedWiFiWidth == wiFiWidth }
137145
.map { (_, expectedWiFiWidthChannels) ->
@@ -153,6 +161,7 @@ class WiFiChannelsTest {
153161
return@forEach
154162
}
155163
channels.forEach { channel ->
164+
println("[$wiFiBand $wiFiWidth | Channel: $channel]")
156165
assertThat(fixture.wiFiWidthByChannel(channel))
157166
.describedAs("$wiFiBand $wiFiWidth | Channel: $channel")
158167
.isEqualTo(wiFiWidth)
@@ -166,6 +175,7 @@ class WiFiChannelsTest {
166175
fixtures.forEach { (wiFiBand, fixture) ->
167176
val first = wiFiBand.wiFiChannels.channelRange.first.channel
168177
val last = wiFiBand.wiFiChannels.channelRange.second.channel
178+
println("[$wiFiBand]")
169179
assertThat(fixture.wiFiWidthByChannel(first - 1))
170180
.describedAs("$wiFiBand")
171181
.isEqualTo(WiFiWidth.MHZ_20)
@@ -178,6 +188,7 @@ class WiFiChannelsTest {
178188
@Test
179189
fun availableChannels() {
180190
fixtures.forEach { (wiFiBand, fixture, expectedWiFiInfo) ->
191+
println("[$wiFiBand]")
181192
assertThat(fixture.availableChannels)
182193
.describedAs("$wiFiBand")
183194
.containsExactlyElementsOf(expectedWiFiInfo.expectedAvailableChannels)
@@ -187,11 +198,12 @@ class WiFiChannelsTest {
187198
@Test
188199
fun graphChannels() {
189200
fixtures.forEach { (wiFiBand, fixture, expectedWiFiInfo) ->
201+
println("[$wiFiBand]")
190202
assertThat(fixture.graphChannels.keys)
191-
.describedAs(wiFiBand.name)
203+
.describedAs("$wiFiBand")
192204
.containsExactlyElementsOf(expectedWiFiInfo.expectedGraphChannels.keys)
193205
assertThat(fixture.graphChannels.values)
194-
.describedAs(wiFiBand.name)
206+
.describedAs("$wiFiBand")
195207
.containsExactlyElementsOf(expectedWiFiInfo.expectedGraphChannels.values)
196208
}
197209
}
@@ -201,21 +213,23 @@ class WiFiChannelsTest {
201213
Locale.getAvailableLocales().forEach { locale ->
202214
val locale = findByCountryCode(locale.country)
203215
fixtures.forEach { (wiFiBand, fixture, _) ->
216+
println("[$wiFiBand | Country: ${locale.country}]")
204217
assertThat(fixture.availableChannels(wiFiBand, locale.country).map { it -> it.channel })
205-
.describedAs("$wiFiBand.name | Country: ${locale.country}")
218+
.describedAs("$wiFiBand | Country: ${locale.country}")
206219
.containsExactlyElementsOf(WiFiChannelCountry(locale).channels(wiFiBand))
207220
}
208221
}
209222
}
210223

211224
@Test
212-
fun availableChannelsUsingWiFiWidtWiFiBandAndCountry() {
225+
fun availableChannelsUsingWiFiWidthWiFiBandAndCountry() {
213226
Locale.getAvailableLocales().forEach { locale ->
214227
val country = findByCountryCode(locale.country).country
215228
fixtures.forEach { (wiFiBand, fixture, expectedWiFiInfo) ->
216229
WiFiWidth.entries.forEach { wiFiWidth ->
230+
println("[$wiFiBand | $wiFiWidth | Country: $country]")
217231
assertThat(fixture.availableChannels(wiFiWidth, wiFiBand, country))
218-
.describedAs("$wiFiBand.name | $wiFiWidth.name | Country: $country")
232+
.describedAs("$wiFiBand | $wiFiWidth | Country: $country")
219233
.containsExactlyElementsOf(expectedWiFiInfo.availableChannels(wiFiWidth, wiFiBand, country))
220234
}
221235
}
@@ -227,8 +241,9 @@ class WiFiChannelsTest {
227241
Locale.getAvailableLocales().forEach { locale ->
228242
val locale = findByCountryCode(locale.country)
229243
fixtures.forEach { (wiFiBand, fixture, expectedWiFiInfo) ->
244+
println("[$wiFiBand Country: ${locale.country}]")
230245
assertThat(fixture.ratingChannels(wiFiBand, locale.country))
231-
.describedAs("$wiFiBand.name | Country: ${locale.country}")
246+
.describedAs("$wiFiBand | Country: ${locale.country}")
232247
.containsExactlyElementsOf(expectedWiFiInfo.expectedRatingChannels(wiFiBand, locale.country))
233248
}
234249
}
@@ -237,17 +252,19 @@ class WiFiChannelsTest {
237252
@Test
238253
fun wiFiChannels() {
239254
fixtures.forEach { (wiFiBand, fixture, expectedWiFiInfo) ->
255+
println("[$wiFiBand]")
240256
assertThat(fixture.wiFiChannels())
241-
.describedAs(wiFiBand.name)
257+
.describedAs("$wiFiBand")
242258
.containsAll(expectedWiFiInfo.expectedChannels)
243259
}
244260
}
245261

246262
@Test
247263
fun graphChannelCount() {
248264
fixtures.forEach { (wiFiBand, fixture, expectedWiFiInfo) ->
265+
println("[$wiFiBand]")
249266
assertThat(fixture.graphChannelCount())
250-
.describedAs(wiFiBand.name)
267+
.describedAs("$wiFiBand")
251268
.isEqualTo(expectedWiFiInfo.expectedChannelsCount)
252269
}
253270
}
@@ -256,8 +273,9 @@ class WiFiChannelsTest {
256273
fun graphChannelByFrequencyInRange() {
257274
fixtures.forEach { (wiFiBand, fixture, expectedWiFiInfo) ->
258275
expectedWiFiInfo.expectedChannels.forEach { (channel, frequency) ->
276+
println("[$wiFiBand | Channel: $channel | Frequency: $frequency]")
259277
assertThat(fixture.graphChannelByFrequency(frequency))
260-
.describedAs("$wiFiBand.name | Channel: $channel | Frequency: $frequency")
278+
.describedAs("$wiFiBand | Channel: $channel | Frequency: $frequency")
261279
.isEqualTo(expectedWiFiInfo.expectedGraphChannels[channel] ?: String.EMPTY)
262280
}
263281
}
@@ -266,11 +284,12 @@ class WiFiChannelsTest {
266284
@Test
267285
fun graphChannelByFrequencyOutOfRange() {
268286
fixtures.forEach { (wiFiBand, fixture, expectedWiFiInfo) ->
287+
println("[$wiFiBand]")
269288
assertThat(fixture.graphChannelByFrequency(expectedWiFiInfo.expectedChannels.first().frequency - 1))
270-
.describedAs(wiFiBand.name)
289+
.describedAs("$wiFiBand")
271290
.isEmpty()
272291
assertThat(fixture.graphChannelByFrequency(expectedWiFiInfo.expectedChannels.last().frequency + 1))
273-
.describedAs(wiFiBand.name)
292+
.describedAs("$wiFiBand")
274293
.isEmpty()
275294
}
276295
}

app/src/test/kotlin/com/vrem/wifianalyzer/wifi/channelrating/ChannelRatingAdapterTest.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ class ChannelRatingAdapterTest {
138138
assertThat(binding.channelRatingMessage.textColors.defaultColor).isEqualTo(expectedColor)
139139
WiFiWidth.entries.forEach { wiFiWidth ->
140140
bindingMap[wiFiWidth]?.let { (channelRatingView, channelRatingTextView) ->
141+
println("[$wiFiWidth]")
141142
assertThat(channelRatingView.visibility).describedAs("$wiFiWidth").isEqualTo(View.GONE)
142143
assertThat(channelRatingTextView.text).describedAs("$wiFiWidth").isEmpty()
143144
}
@@ -160,6 +161,7 @@ class ChannelRatingAdapterTest {
160161
assertThat(binding.channelRatingMessage.textColors.defaultColor).isEqualTo(expectedColor)
161162
WiFiWidth.entries.forEach { wiFiWidth ->
162163
bindingMap[wiFiWidth]?.let { (channelRatingView, channelRatingTextView) ->
164+
println("[$wiFiWidth]")
163165
assertThat(channelRatingView.visibility).describedAs("$wiFiWidth").isEqualTo(View.GONE)
164166
assertThat(channelRatingTextView.text).describedAs("$wiFiWidth").isEmpty()
165167
}
@@ -184,6 +186,7 @@ class ChannelRatingAdapterTest {
184186
.map { it.wiFiChannel.channel }
185187
.joinToString(",")
186188
bindingMap[wiFiWidth]?.let { (channelRatingView, channelRatingTextView) ->
189+
println("[$wiFiWidth]")
187190
assertThat(channelRatingView.visibility).describedAs("$wiFiWidth").isEqualTo(View.VISIBLE)
188191
assertThat(channelRatingTextView.text).describedAs("$wiFiWidth").isEqualTo(expected)
189192
}

0 commit comments

Comments
 (0)