@@ -2,7 +2,6 @@ package net.squanchy.service.firebase
22
33import com.google.common.truth.Truth.assertThat
44import net.squanchy.support.checksum.Checksum
5- import net.squanchy.support.lang.getOrThrow
65import org.junit.Before
76import org.junit.Rule
87import org.junit.Test
@@ -50,41 +49,41 @@ class FirestoreTrackMapperTest {
5049 fun `track url should match when mapped` () {
5150 val firestoreTrack = aFirestoreTrack(iconUrl = A_NAME )
5251 val track = firestoreTrack.toTrack(checksum)
53- assertThat(track.iconUrl.getOrThrow() ).isEqualTo(A_NAME )
52+ assertThat(track.iconUrl).isEqualTo(A_NAME )
5453 }
5554
5655 @Test
5756 fun `track url should be empty when mapping null` () {
5857 val firestoreTrack = aFirestoreTrack(iconUrl = null )
5958 val track = firestoreTrack.toTrack(checksum)
60- assertThat(track.iconUrl.isEmpty()).isTrue ()
59+ assertThat(track.iconUrl).isNull ()
6160 }
6261
6362 @Test
6463 fun `accent color should match when mapped` () {
6564 val firestoreTrack = aFirestoreTrack(accentColor = A_COLOR )
6665 val track = firestoreTrack.toTrack(checksum)
67- assertThat(track.accentColor.getOrThrow() ).isEqualTo(A_COLOR )
66+ assertThat(track.accentColor).isEqualTo(A_COLOR )
6867 }
6968
7069 @Test
7170 fun `accent color should be empty when mapping null` () {
7271 val firestoreTrack = aFirestoreTrack(accentColor = null )
7372 val track = firestoreTrack.toTrack(checksum)
74- assertThat(track.accentColor.isEmpty()).isTrue ()
73+ assertThat(track.accentColor).isNull ()
7574 }
7675
7776 @Test
7877 fun `text color should match when mapped` () {
7978 val firestoreTrack = aFirestoreTrack(textColor = A_COLOR )
8079 val track = firestoreTrack.toTrack(checksum)
81- assertThat(track.textColor.getOrThrow() ).isEqualTo(A_COLOR )
80+ assertThat(track.textColor).isEqualTo(A_COLOR )
8281 }
8382
8483 @Test
8584 fun `text color should be empty when mapping null` () {
8685 val firestoreTrack = aFirestoreTrack(textColor = null )
8786 val track = firestoreTrack.toTrack(checksum)
88- assertThat(track.textColor.isEmpty()).isTrue ()
87+ assertThat(track.textColor).isNull ()
8988 }
9089}
0 commit comments