Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
albin-mullvad committed Aug 27, 2024
1 parent d470b22 commit d639256
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ private val DUMMY_RELAY_1 =
Provider(
providerId = ProviderId("PROVIDER RENTED"),
ownership = Ownership.Rented,
)
),
daita = false
)
private val DUMMY_RELAY_2 =
RelayItem.Location.Relay(
Expand All @@ -35,7 +36,8 @@ private val DUMMY_RELAY_2 =
),
active = true,
provider =
Provider(providerId = ProviderId("PROVIDER OWNED"), ownership = Ownership.MullvadOwned)
Provider(providerId = ProviderId("PROVIDER OWNED"), ownership = Ownership.MullvadOwned),
daita = false
)
private val DUMMY_RELAY_CITY_1 =
RelayItem.Location.City(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class RelayNameComparatorTest {
providerId = ProviderId("Provider"),
ownership = Ownership.MullvadOwned
),
daita = false
)
val relay10 =
RelayItem.Location.Relay(
Expand All @@ -38,7 +39,8 @@ class RelayNameComparatorTest {
Provider(
providerId = ProviderId("Provider"),
ownership = Ownership.MullvadOwned
)
),
daita = false
)

relay9 assertOrderBothDirection relay10
Expand All @@ -54,7 +56,8 @@ class RelayNameComparatorTest {
Provider(
providerId = ProviderId("Provider"),
ownership = Ownership.MullvadOwned
)
),
daita = false
)
val relay9b =
RelayItem.Location.Relay(
Expand All @@ -64,7 +67,8 @@ class RelayNameComparatorTest {
Provider(
providerId = ProviderId("Provider"),
ownership = Ownership.MullvadOwned
)
),
daita = false
)

assertTrue(RelayNameComparator.compare(relay9a, relay9b) == 0)
Expand All @@ -81,7 +85,8 @@ class RelayNameComparatorTest {
Provider(
providerId = ProviderId("Provider"),
ownership = Ownership.MullvadOwned
)
),
daita = false
)
val relay1 =
RelayItem.Location.Relay(
Expand All @@ -91,7 +96,8 @@ class RelayNameComparatorTest {
Provider(
providerId = ProviderId("Provider"),
ownership = Ownership.MullvadOwned
)
),
daita = false
)
val relay3 =
RelayItem.Location.Relay(
Expand All @@ -101,7 +107,8 @@ class RelayNameComparatorTest {
Provider(
providerId = ProviderId("Provider"),
ownership = Ownership.MullvadOwned
)
),
daita = false
)
val relay100 =
RelayItem.Location.Relay(
Expand All @@ -111,7 +118,8 @@ class RelayNameComparatorTest {
Provider(
providerId = ProviderId("Provider"),
ownership = Ownership.MullvadOwned
)
),
daita = false
)

relay001 assertOrderBothDirection relay1
Expand All @@ -130,7 +138,8 @@ class RelayNameComparatorTest {
Provider(
providerId = ProviderId("Provider"),
ownership = Ownership.MullvadOwned
)
),
daita = false
)
val relay9b =
RelayItem.Location.Relay(
Expand All @@ -140,7 +149,8 @@ class RelayNameComparatorTest {
Provider(
providerId = ProviderId("Provider"),
ownership = Ownership.MullvadOwned
)
),
daita = false
)

assertTrue(RelayNameComparator.compare(relay9a, relay9b) == 0)
Expand All @@ -157,7 +167,8 @@ class RelayNameComparatorTest {
Provider(
providerId = ProviderId("Provider"),
ownership = Ownership.MullvadOwned
)
),
daita = false
)
val relay005 =
RelayItem.Location.Relay(
Expand All @@ -167,7 +178,8 @@ class RelayNameComparatorTest {
Provider(
providerId = ProviderId("Provider"),
ownership = Ownership.MullvadOwned
)
),
daita = false
)

relay001 assertOrderBothDirection relay005
Expand All @@ -183,7 +195,8 @@ class RelayNameComparatorTest {
Provider(
providerId = ProviderId("Provider"),
ownership = Ownership.MullvadOwned
)
),
daita = false
)
val relayAr8 =
RelayItem.Location.Relay(
Expand All @@ -193,7 +206,8 @@ class RelayNameComparatorTest {
Provider(
providerId = ProviderId("Provider"),
ownership = Ownership.MullvadOwned
)
),
daita = false
)
val relaySe5 =
RelayItem.Location.Relay(
Expand All @@ -203,7 +217,8 @@ class RelayNameComparatorTest {
Provider(
providerId = ProviderId("Provider"),
ownership = Ownership.MullvadOwned
)
),
daita = false
)
val relaySe10 =
RelayItem.Location.Relay(
Expand All @@ -213,7 +228,8 @@ class RelayNameComparatorTest {
Provider(
providerId = ProviderId("Provider"),
ownership = Ownership.MullvadOwned
)
),
daita = false
)

relayAr2 assertOrderBothDirection relayAr8
Expand All @@ -231,7 +247,8 @@ class RelayNameComparatorTest {
Provider(
providerId = ProviderId("Provider"),
ownership = Ownership.MullvadOwned
)
),
daita = false
)
val relay2w =
RelayItem.Location.Relay(
Expand All @@ -241,7 +258,8 @@ class RelayNameComparatorTest {
Provider(
providerId = ProviderId("Provider"),
ownership = Ownership.MullvadOwned
)
),
daita = false
)

relay2c assertOrderBothDirection relay2w
Expand All @@ -257,7 +275,8 @@ class RelayNameComparatorTest {
Provider(
providerId = ProviderId("Provider"),
ownership = Ownership.MullvadOwned
)
),
daita = false
)
val relay22b =
RelayItem.Location.Relay(
Expand All @@ -267,7 +286,8 @@ class RelayNameComparatorTest {
Provider(
providerId = ProviderId("Provider"),
ownership = Ownership.MullvadOwned
)
),
daita = false
)

relay22a assertOrderBothDirection relay22b
Expand Down

0 comments on commit d639256

Please sign in to comment.