Skip to content

Commit 7c0fb8a

Browse files
authored
Replaced Collection with higher Iterable interface and list with set. (#385)
1 parent bfae74d commit 7c0fb8a

File tree

19 files changed

+35
-35
lines changed

19 files changed

+35
-35
lines changed

app/src/test/java/com/mitteloupe/whoami/navigation/mapper/HistoryNavigationEventDestinationMapperTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class HistoryNavigationEventDestinationMapperTest(
1919
companion object {
2020
@JvmStatic
2121
@Parameters(name = "Given {0}")
22-
fun data(): Collection<Array<*>> = listOf(
22+
fun data(): Iterable<Array<*>> = setOf(
2323
testCase(Back) { navController ->
2424
verify(navController).navigateUp()
2525
}

datasource/implementation/src/test/java/com/mitteloupe/whoami/datasource/history/mapper/NewIpAddressRecordLocalMapperTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class NewIpAddressRecordLocalMapperTest(
2424
companion object {
2525
@JvmStatic
2626
@Parameters(name = "Given {0}, time then returns {2}")
27-
fun data(): Collection<Array<*>> = listOf(
27+
fun data(): Iterable<Array<*>> = setOf(
2828
testCase(
2929
testTitle = "all nulls",
3030
ipAddress = "1.1.1.1",

datasource/implementation/src/test/java/com/mitteloupe/whoami/datasource/history/mapper/SavedIpAddressRecordDataMapperTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class SavedIpAddressRecordDataMapperTest(
2121
companion object {
2222
@JvmStatic
2323
@Parameters(name = "Given {0}, time then returns {2}")
24-
fun data(): Collection<Array<*>> = listOf(
24+
fun data(): Iterable<Array<*>> = setOf(
2525
testCase(
2626
testTitle = "all nulls",
2727
ipAddress = "1.1.1.1",

datasource/implementation/src/test/java/com/mitteloupe/whoami/datasource/ipaddress/mapper/IpAddressDataMapperTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class IpAddressDataMapperTest(
1616
companion object {
1717
@JvmStatic
1818
@Parameters(name = "Given {0}")
19-
fun data(): Collection<Array<*>> = listOf(
19+
fun data(): Iterable<Array<*>> = setOf(
2020
testCase("1.1.1.1"),
2121
testCase("2.3.4.5")
2222
)

datasource/implementation/src/test/java/com/mitteloupe/whoami/datasource/ipaddressinformation/mapper/IpAddressInformationDataMapperTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class IpAddressInformationDataMapperTest(
1717
companion object {
1818
@JvmStatic
1919
@Parameters(name = "Given {0} then returns {1}")
20-
fun data(): Collection<Array<*>> = listOf(
20+
fun data(): Iterable<Array<*>> = setOf(
2121
testCase(
2222
city = "New York",
2323
region = "New York",

history/data/src/test/java/com/mitteloupe/whoami/history/data/mapper/HistoryRecordDeletionDataMapperTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class HistoryRecordDeletionDataMapperTest(
1717
companion object {
1818
@JvmStatic
1919
@Parameters(name = "Given {0} then returns {2}")
20-
fun data(): Collection<Array<*>> = listOf(
20+
fun data(): Iterable<Array<*>> = setOf(
2121
testCase(ipAddress = "1.2.3.4"),
2222
testCase(ipAddress = "4.3.2.1")
2323
)

history/data/src/test/java/com/mitteloupe/whoami/history/data/mapper/SavedIpAddressRecordDomainMapperTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class SavedIpAddressRecordDomainMapperTest(
1818
companion object {
1919
@JvmStatic
2020
@Parameters(name = "Given {0} then returns {2}")
21-
fun data(): Collection<Array<*>> = listOf(
21+
fun data(): Iterable<Array<*>> = setOf(
2222
testCase(
2323
testTitle = "all set",
2424
ipAddress = "1.2.3.4",

history/presentation/src/test/java/com/mitteloupe/whoami/history/presentation/mapper/DeleteHistoryRecordRequestDomainMapperTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class DeleteHistoryRecordRequestDomainMapperTest(
1818
companion object {
1919
@JvmStatic
2020
@Parameters(name = "Given {0} then returns {2}")
21-
fun data(): Collection<Array<*>> = listOf(
21+
fun data(): Iterable<Array<*>> = setOf(
2222
testCase(
2323
testTitle = "case 1",
2424
ipAddress = "1.1.1.1"

history/presentation/src/test/java/com/mitteloupe/whoami/history/presentation/mapper/SavedIpAddressRecordPresentationMapperTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class SavedIpAddressRecordPresentationMapperTest(
1818
companion object {
1919
@JvmStatic
2020
@Parameters(name = "Given {0} then returns {2}")
21-
fun data(): Collection<Array<*>> = listOf(
21+
fun data(): Iterable<Array<*>> = setOf(
2222
testCase(
2323
testTitle = "all nulls",
2424
ipAddress = "1.1.1.1",

history/ui/src/test/java/com/mitteloupe/whoami/history/ui/mapper/HistoryRecordDeletionPresentationMapperTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class HistoryRecordDeletionPresentationMapperTest(
1717
companion object {
1818
@JvmStatic
1919
@Parameters(name = "Given {0} then returns {1}")
20-
fun data(): Collection<Array<*>> = listOf(
20+
fun data(): Iterable<Array<*>> = setOf(
2121
testCase("0.0.0.0"),
2222
testCase("255.255.255.255")
2323
)

history/ui/src/test/java/com/mitteloupe/whoami/history/ui/mapper/HistoryRecordUiMapperTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class HistoryRecordUiMapperTest(
3030
companion object {
3131
@JvmStatic
3232
@Parameters(name = "{0} then returns {2}")
33-
fun data(): Collection<Array<*>> = listOf(
33+
fun data(): Iterable<Array<*>> = setOf(
3434
testCase(
3535
testTitle = "All nulls",
3636
ipAddress = "1.2.3.4",

home/data/src/test/java/com/mitteloupe/whoami/home/data/mapper/ConnectionDetailsDataMapperTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class ConnectionDetailsDataMapperTest(
1818
companion object {
1919
@JvmStatic
2020
@Parameters(name = "Given {0} then returns {2}")
21-
fun data(): Collection<Array<*>> = listOf(
21+
fun data(): Iterable<Array<*>> = setOf(
2222
testCase(
2323
testTitle = "all nulls",
2424
ipAddress = "1.1.1.1",

home/data/src/test/java/com/mitteloupe/whoami/home/data/mapper/ConnectionDetailsDomainResolverTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class ConnectionDetailsDomainResolverTest(
2525
companion object {
2626
@JvmStatic
2727
@Parameters(name = "Given {0} then returns {3}")
28-
fun data(): Collection<Array<*>> = listOf(
28+
fun data(): Iterable<Array<*>> = setOf(
2929
connectedWithTestCase(
3030
testTitle = "no information",
3131
city = null,

home/data/src/test/java/com/mitteloupe/whoami/home/data/mapper/ThrowableDomainMapperTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class ThrowableDomainMapperTest(
2121
companion object {
2222
@JvmStatic
2323
@Parameters(name = "Given {0}")
24-
fun data(): Collection<Array<*>> = listOf(
24+
fun data(): Iterable<Array<*>> = setOf(
2525
testCase(NoIpAddressDataException()) { exception ->
2626
assertThat(
2727
exception::class.java,

home/presentation/src/test/java/com/mitteloupe/whoami/home/presentation/mapper/ConnectionDetailsDomainMapperTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class ConnectionDetailsDomainMapperTest(
1717
companion object {
1818
@JvmStatic
1919
@Parameters(name = "Given {0} then returns {1}")
20-
fun data(): Collection<Array<*>> = listOf(
20+
fun data(): Iterable<Array<*>> = setOf(
2121
connectedTestCase(
2222
ipAddress = "1.1.1.1",
2323
city = null,

home/presentation/src/test/java/com/mitteloupe/whoami/home/presentation/mapper/ConnectionDetailsPresentationMapperTest.kt

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,26 @@ class ConnectionDetailsPresentationMapperTest(
3030
companion object {
3131
@JvmStatic
3232
@Parameters(name = "Given {0} then returns {1}")
33-
fun data(): Collection<Array<*>> = listOf(
33+
fun data(): Iterable<Array<*>> = setOf(
3434
connectedTestCase(
35-
"1.2.3.4",
36-
null,
37-
null,
38-
null,
39-
null,
40-
null,
41-
null,
42-
null
35+
ipAddress = "1.2.3.4",
36+
city = null,
37+
region = null,
38+
country = null,
39+
geolocation = null,
40+
internetServiceProviderName = null,
41+
postCode = null,
42+
timeZone = null
4343
),
4444
connectedTestCase(
45-
"1.2.3.4",
46-
"New York",
47-
"New York",
48-
"United States",
49-
"1.0,1.0",
50-
"Whistle",
51-
"A123456",
52-
"EST"
45+
ipAddress = "4.3.2.1",
46+
city = "New York",
47+
region = "New York",
48+
country = "United States",
49+
geolocation = "1.0,1.0",
50+
internetServiceProviderName = "Whistle",
51+
postCode = "A123456",
52+
timeZone = "EST"
5353
),
5454
testCase(Disconnected, HomeViewState.Disconnected),
5555
testCase(Unset, HomeViewState.Loading),

home/presentation/src/test/java/com/mitteloupe/whoami/home/presentation/mapper/ExceptionPresentationMapperTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class ExceptionPresentationMapperTest(
2121
companion object {
2222
@JvmStatic
2323
@Parameters(name = "Given {0} then returns {1}")
24-
fun data(): Collection<Array<*>> = listOf(
24+
fun data(): Iterable<Array<*>> = setOf(
2525
testCase(ReadFailedDomainException(Throwable()), ErrorPresentationModel.RequestTimeout),
2626
testCase(NoIpAddressDomainException(), ErrorPresentationModel.NoIpAddress),
2727
noIpAddressInformationTestCase("1.2.3.4"),

home/ui/src/test/java/com/mitteloupe/whoami/home/ui/mapper/ConnectionDetailsUiMapperTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class ConnectionDetailsUiMapperTest(
2020
companion object {
2121
@JvmStatic
2222
@Parameters(name = "Given {0}")
23-
fun data(): Collection<Array<*>> = listOf(
23+
fun data(): Iterable<Array<*>> = setOf(
2424
testCase(
2525
testTitle = "case 1",
2626
ipAddress = "1.2.3.4",

home/ui/src/test/java/com/mitteloupe/whoami/home/ui/mapper/HomeNotificationUiMapperTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class HomeNotificationUiMapperTest(
3030

3131
@JvmStatic
3232
@Parameters(name = "Given {0}")
33-
fun data(): Collection<Array<*>> = listOf(
33+
fun data(): Iterable<Array<*>> = setOf(
3434
testCase(
3535
"connection saved notification then presents toast",
3636
ConnectionSaved(SAVED_CONNECTION_IP_ADDRESS),

0 commit comments

Comments
 (0)