@@ -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 }
0 commit comments