mirror of
https://github.com/ultrasonic/ultrasonic
synced 2025-02-14 02:30:52 +01:00
Fixed deprecation warnings for kluent
This commit is contained in:
parent
1deefb6a22
commit
e37791e37c
@ -6,10 +6,10 @@ import com.nhaarman.mockito_kotlin.mock
|
|||||||
import com.nhaarman.mockito_kotlin.whenever
|
import com.nhaarman.mockito_kotlin.whenever
|
||||||
import com.squareup.picasso.Picasso
|
import com.squareup.picasso.Picasso
|
||||||
import com.squareup.picasso.Request
|
import com.squareup.picasso.Request
|
||||||
import org.amshove.kluent.`should equal`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should not be`
|
import org.amshove.kluent.`should not be`
|
||||||
import org.amshove.kluent.`should throw`
|
import org.amshove.kluent.`should throw`
|
||||||
import org.amshove.kluent.shouldEqualTo
|
import org.amshove.kluent.shouldBeEqualTo
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.junit.runner.RunWith
|
import org.junit.runner.RunWith
|
||||||
import org.moire.ultrasonic.api.subsonic.SubsonicAPIClient
|
import org.moire.ultrasonic.api.subsonic.SubsonicAPIClient
|
||||||
@ -27,7 +27,7 @@ class AvatarRequestHandlerTest {
|
|||||||
fun `Should accept only cover art request`() {
|
fun `Should accept only cover art request`() {
|
||||||
val requestUri = createLoadAvatarRequest("some-username")
|
val requestUri = createLoadAvatarRequest("some-username")
|
||||||
|
|
||||||
handler.canHandleRequest(requestUri.buildRequest()) shouldEqualTo true
|
handler.canHandleRequest(requestUri.buildRequest()) shouldBeEqualTo true
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -38,7 +38,7 @@ class AvatarRequestHandlerTest {
|
|||||||
.appendPath("something")
|
.appendPath("something")
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
handler.canHandleRequest(requestUri.buildRequest()) shouldEqualTo false
|
handler.canHandleRequest(requestUri.buildRequest()) shouldBeEqualTo false
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -65,7 +65,7 @@ class AvatarRequestHandlerTest {
|
|||||||
|
|
||||||
val response = handler.load(createLoadAvatarRequest("some-username").buildRequest(), 0)
|
val response = handler.load(createLoadAvatarRequest("some-username").buildRequest(), 0)
|
||||||
|
|
||||||
response.loadedFrom `should equal` Picasso.LoadedFrom.NETWORK
|
response.loadedFrom `should be equal to` Picasso.LoadedFrom.NETWORK
|
||||||
response.source `should not be` null
|
response.source `should not be` null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,10 +8,10 @@ import com.nhaarman.mockito_kotlin.whenever
|
|||||||
import com.squareup.picasso.Picasso
|
import com.squareup.picasso.Picasso
|
||||||
import com.squareup.picasso.Request
|
import com.squareup.picasso.Request
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import org.amshove.kluent.`should equal`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should not be`
|
import org.amshove.kluent.`should not be`
|
||||||
import org.amshove.kluent.`should throw`
|
import org.amshove.kluent.`should throw`
|
||||||
import org.amshove.kluent.shouldEqualTo
|
import org.amshove.kluent.shouldBeEqualTo
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.junit.runner.RunWith
|
import org.junit.runner.RunWith
|
||||||
import org.moire.ultrasonic.api.subsonic.SubsonicAPIClient
|
import org.moire.ultrasonic.api.subsonic.SubsonicAPIClient
|
||||||
@ -27,7 +27,7 @@ class CoverArtRequestHandlerTest {
|
|||||||
fun `Should accept only cover art request`() {
|
fun `Should accept only cover art request`() {
|
||||||
val requestUri = createLoadCoverArtRequest("some-id")
|
val requestUri = createLoadCoverArtRequest("some-id")
|
||||||
|
|
||||||
handler.canHandleRequest(requestUri.buildRequest()) shouldEqualTo true
|
handler.canHandleRequest(requestUri.buildRequest()) shouldBeEqualTo true
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -38,7 +38,7 @@ class CoverArtRequestHandlerTest {
|
|||||||
.appendPath("random")
|
.appendPath("random")
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
handler.canHandleRequest(requestUri.buildRequest()) shouldEqualTo false
|
handler.canHandleRequest(requestUri.buildRequest()) shouldBeEqualTo false
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -78,7 +78,7 @@ class CoverArtRequestHandlerTest {
|
|||||||
|
|
||||||
val response = handler.load(createLoadCoverArtRequest("some").buildRequest(), 0)
|
val response = handler.load(createLoadCoverArtRequest("some").buildRequest(), 0)
|
||||||
|
|
||||||
response.loadedFrom `should equal` Picasso.LoadedFrom.NETWORK
|
response.loadedFrom `should be equal to` Picasso.LoadedFrom.NETWORK
|
||||||
response.source `should not be` null
|
response.source `should not be` null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package org.moire.ultrasonic.subsonic.loader.image
|
package org.moire.ultrasonic.subsonic.loader.image
|
||||||
|
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import org.amshove.kluent.shouldEqualTo
|
import org.amshove.kluent.shouldBeEqualTo
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.junit.runner.RunWith
|
import org.junit.runner.RunWith
|
||||||
import org.robolectric.RobolectricTestRunner
|
import org.robolectric.RobolectricTestRunner
|
||||||
@ -13,7 +13,7 @@ class RequestCreatorTest {
|
|||||||
val entityId = "299"
|
val entityId = "299"
|
||||||
val expectedUri = Uri.parse("$SCHEME://$AUTHORITY/$COVER_ART_PATH?$QUERY_ID=$entityId")
|
val expectedUri = Uri.parse("$SCHEME://$AUTHORITY/$COVER_ART_PATH?$QUERY_ID=$entityId")
|
||||||
|
|
||||||
createLoadCoverArtRequest(entityId).compareTo(expectedUri).shouldEqualTo(0)
|
createLoadCoverArtRequest(entityId).compareTo(expectedUri).shouldBeEqualTo(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -21,6 +21,6 @@ class RequestCreatorTest {
|
|||||||
val username = "some-username"
|
val username = "some-username"
|
||||||
val expectedUri = Uri.parse("$SCHEME://$AUTHORITY/$AVATAR_PATH?$QUERY_USERNAME=$username")
|
val expectedUri = Uri.parse("$SCHEME://$AUTHORITY/$AVATAR_PATH?$QUERY_USERNAME=$username")
|
||||||
|
|
||||||
createLoadAvatarRequest(username).compareTo(expectedUri).shouldEqualTo(0)
|
createLoadAvatarRequest(username).compareTo(expectedUri).shouldBeEqualTo(0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@ package org.moire.ultrasonic.api.subsonic
|
|||||||
|
|
||||||
import java.util.Calendar
|
import java.util.Calendar
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
||||||
|
|
||||||
@ -16,7 +15,7 @@ class SubsonicApiCreateShareTest : SubsonicAPIClientTest() {
|
|||||||
client.api.createShare(listOf("some-id")).execute()
|
client.api.createShare(listOf("some-id")).execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
response.shares `should equal` emptyList()
|
response.shares `should be equal to` emptyList()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -34,13 +33,13 @@ class SubsonicApiCreateShareTest : SubsonicAPIClientTest() {
|
|||||||
"eyJwYXRoIjoiL2V4dC9zaGFyZS9hd2R3byIsImV4cCI6MTU0MTYyNjQzMX0.iy8dkt_ZZc8hJ692" +
|
"eyJwYXRoIjoiL2V4dC9zaGFyZS9hd2R3byIsImV4cCI6MTU0MTYyNjQzMX0.iy8dkt_ZZc8hJ692" +
|
||||||
"UxorHdHWFU2RB-fMCmCA4IJ_dTw"
|
"UxorHdHWFU2RB-fMCmCA4IJ_dTw"
|
||||||
username `should be equal to` "admin"
|
username `should be equal to` "admin"
|
||||||
created `should equal` parseDate("2017-11-07T21:33:51.748Z")
|
created `should be equal to` parseDate("2017-11-07T21:33:51.748Z")
|
||||||
expires `should equal` parseDate("2018-11-07T21:33:51.748Z")
|
expires `should be equal to` parseDate("2018-11-07T21:33:51.748Z")
|
||||||
lastVisited `should equal` parseDate("2018-11-07T21:33:51.748Z")
|
lastVisited `should be equal to` parseDate("2018-11-07T21:33:51.748Z")
|
||||||
description `should be equal to` "Awesome link!"
|
description `should be equal to` "Awesome link!"
|
||||||
visitCount `should be equal to` 0
|
visitCount `should be equal to` 0
|
||||||
items.size `should be equal to` 1
|
items.size `should be equal to` 1
|
||||||
items[0] `should equal` MusicDirectoryChild(
|
items[0] `should be equal to` MusicDirectoryChild(
|
||||||
id = "4212", parent = "4186", isDir = false,
|
id = "4212", parent = "4186", isDir = false,
|
||||||
title = "Heaven Knows", album = "Going to Hell", artist = "The Pretty Reckless",
|
title = "Heaven Knows", album = "Going to Hell", artist = "The Pretty Reckless",
|
||||||
track = 3, year = 2014, genre = "Hard Rock", coverArt = "4186", size = 9025090,
|
track = 3, year = 2014, genre = "Hard Rock", coverArt = "4186", size = 9025090,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic
|
package org.moire.ultrasonic.api.subsonic
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import org.amshove.kluent.`should equal`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should not be`
|
import org.amshove.kluent.`should not be`
|
||||||
import org.amshove.kluent.`should throw`
|
import org.amshove.kluent.`should throw`
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
@ -152,6 +152,6 @@ class SubsonicApiErrorsTest : SubsonicAPIClientTest() {
|
|||||||
private fun Response<SubsonicResponse>.assertError(expectedError: SubsonicError) =
|
private fun Response<SubsonicResponse>.assertError(expectedError: SubsonicError) =
|
||||||
with(body()!!) {
|
with(body()!!) {
|
||||||
error `should not be` null
|
error `should not be` null
|
||||||
error `should equal` expectedError
|
error `should be equal to` expectedError
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic
|
package org.moire.ultrasonic.api.subsonic
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.Album
|
import org.moire.ultrasonic.api.subsonic.models.Album
|
||||||
import org.moire.ultrasonic.api.subsonic.models.AlbumListType
|
import org.moire.ultrasonic.api.subsonic.models.AlbumListType
|
||||||
@ -18,7 +17,7 @@ class SubsonicApiGetAlbumList2Test : SubsonicAPIClientTest() {
|
|||||||
client.api.getAlbumList2(STARRED).execute()
|
client.api.getAlbumList2(STARRED).execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
response.albumList `should equal` emptyList()
|
response.albumList `should be equal to` emptyList()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -30,13 +29,13 @@ class SubsonicApiGetAlbumList2Test : SubsonicAPIClientTest() {
|
|||||||
assertResponseSuccessful(response)
|
assertResponseSuccessful(response)
|
||||||
with(response.body()!!.albumList) {
|
with(response.body()!!.albumList) {
|
||||||
this.size `should be equal to` 2
|
this.size `should be equal to` 2
|
||||||
this[0] `should equal` Album(
|
this[0] `should be equal to` Album(
|
||||||
id = "962", name = "Fury", artist = "Sick Puppies",
|
id = "962", name = "Fury", artist = "Sick Puppies",
|
||||||
artistId = "473", coverArt = "al-962", songCount = 13, duration = 2591,
|
artistId = "473", coverArt = "al-962", songCount = 13, duration = 2591,
|
||||||
created = parseDate("2017-09-02T17:34:51.000Z"), year = 2016,
|
created = parseDate("2017-09-02T17:34:51.000Z"), year = 2016,
|
||||||
genre = "Alternative Rock"
|
genre = "Alternative Rock"
|
||||||
)
|
)
|
||||||
this[1] `should equal` Album(
|
this[1] `should be equal to` Album(
|
||||||
id = "961", name = "Endless Forms Most Beautiful",
|
id = "961", name = "Endless Forms Most Beautiful",
|
||||||
artist = "Nightwish", artistId = "559", coverArt = "al-961", songCount = 22,
|
artist = "Nightwish", artistId = "559", coverArt = "al-961", songCount = 22,
|
||||||
duration = 9469, created = parseDate("2017-09-02T16:22:47.000Z"),
|
duration = 9469, created = parseDate("2017-09-02T16:22:47.000Z"),
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic
|
package org.moire.ultrasonic.api.subsonic
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.AlbumListType
|
import org.moire.ultrasonic.api.subsonic.models.AlbumListType
|
||||||
import org.moire.ultrasonic.api.subsonic.models.AlbumListType.BY_GENRE
|
import org.moire.ultrasonic.api.subsonic.models.AlbumListType.BY_GENRE
|
||||||
@ -17,7 +16,7 @@ class SubsonicApiGetAlbumListRequestTest : SubsonicAPIClientTest() {
|
|||||||
client.api.getAlbumList(BY_GENRE).execute()
|
client.api.getAlbumList(BY_GENRE).execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
response.albumList `should equal` emptyList()
|
response.albumList `should be equal to` emptyList()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -29,7 +28,7 @@ class SubsonicApiGetAlbumListRequestTest : SubsonicAPIClientTest() {
|
|||||||
assertResponseSuccessful(response)
|
assertResponseSuccessful(response)
|
||||||
with(response.body()!!.albumList) {
|
with(response.body()!!.albumList) {
|
||||||
size `should be equal to` 2
|
size `should be equal to` 2
|
||||||
this[1] `should equal` MusicDirectoryChild(
|
this[1] `should be equal to` MusicDirectoryChild(
|
||||||
id = "9997", parent = "9996", isDir = true,
|
id = "9997", parent = "9996", isDir = true,
|
||||||
title = "Endless Forms Most Beautiful", album = "Endless Forms Most Beautiful",
|
title = "Endless Forms Most Beautiful", album = "Endless Forms Most Beautiful",
|
||||||
artist = "Nightwish", year = 2015, genre = "Symphonic Metal",
|
artist = "Nightwish", year = 2015, genre = "Symphonic Metal",
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic
|
package org.moire.ultrasonic.api.subsonic
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.amshove.kluent.`should not be`
|
import org.amshove.kluent.`should not be`
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.Album
|
import org.moire.ultrasonic.api.subsonic.models.Album
|
||||||
@ -18,7 +17,7 @@ class SubsonicApiGetAlbumTest : SubsonicAPIClientTest() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
response.album `should not be` null
|
response.album `should not be` null
|
||||||
response.album `should equal` Album()
|
response.album `should be equal to` Album()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -48,11 +47,11 @@ class SubsonicApiGetAlbumTest : SubsonicAPIClientTest() {
|
|||||||
coverArt `should be equal to` "al-618"
|
coverArt `should be equal to` "al-618"
|
||||||
songCount `should be equal to` 15
|
songCount `should be equal to` 15
|
||||||
duration `should be equal to` 3331
|
duration `should be equal to` 3331
|
||||||
created `should equal` parseDate("2016-10-23T15:31:22.000Z")
|
created `should be equal to` parseDate("2016-10-23T15:31:22.000Z")
|
||||||
year `should be equal to` 2008
|
year `should be equal to` 2008
|
||||||
genre `should be equal to` "Hard Rock"
|
genre `should be equal to` "Hard Rock"
|
||||||
songList.size `should be equal to` 15
|
songList.size `should be equal to` 15
|
||||||
songList[0] `should equal` MusicDirectoryChild(
|
songList[0] `should be equal to` MusicDirectoryChild(
|
||||||
id = "6491", parent = "6475",
|
id = "6491", parent = "6475",
|
||||||
isDir = false, title = "Rock 'n' Roll Train", album = "Black Ice",
|
isDir = false, title = "Rock 'n' Roll Train", album = "Black Ice",
|
||||||
artist = "AC/DC", track = 1, year = 2008, genre = "Hard Rock",
|
artist = "AC/DC", track = 1, year = 2008, genre = "Hard Rock",
|
||||||
@ -63,7 +62,7 @@ class SubsonicApiGetAlbumTest : SubsonicAPIClientTest() {
|
|||||||
created = parseDate("2016-10-23T15:31:20.000Z"),
|
created = parseDate("2016-10-23T15:31:20.000Z"),
|
||||||
albumId = "618", artistId = "362", type = "music"
|
albumId = "618", artistId = "362", type = "music"
|
||||||
)
|
)
|
||||||
songList[5] `should equal` MusicDirectoryChild(
|
songList[5] `should be equal to` MusicDirectoryChild(
|
||||||
id = "6492", parent = "6475",
|
id = "6492", parent = "6475",
|
||||||
isDir = false, title = "Smash 'n' Grab", album = "Black Ice", artist = "AC/DC",
|
isDir = false, title = "Smash 'n' Grab", album = "Black Ice", artist = "AC/DC",
|
||||||
track = 6, year = 2008, genre = "Hard Rock", coverArt = "6475", size = 6697204,
|
track = 6, year = 2008, genre = "Hard Rock", coverArt = "6475", size = 6697204,
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic
|
package org.moire.ultrasonic.api.subsonic
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.amshove.kluent.`should not be`
|
import org.amshove.kluent.`should not be`
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.Album
|
import org.moire.ultrasonic.api.subsonic.models.Album
|
||||||
@ -18,7 +17,7 @@ class SubsonicApiGetArtistTest : SubsonicAPIClientTest() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
response.artist `should not be` null
|
response.artist `should not be` null
|
||||||
response.artist `should equal` Artist()
|
response.artist `should be equal to` Artist()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -46,13 +45,13 @@ class SubsonicApiGetArtistTest : SubsonicAPIClientTest() {
|
|||||||
coverArt `should be equal to` "ar-362"
|
coverArt `should be equal to` "ar-362"
|
||||||
albumCount `should be equal to` 2
|
albumCount `should be equal to` 2
|
||||||
albumsList.size `should be equal to` 2
|
albumsList.size `should be equal to` 2
|
||||||
albumsList[0] `should equal` Album(
|
albumsList[0] `should be equal to` Album(
|
||||||
id = "618", name = "Black Ice", artist = "AC/DC",
|
id = "618", name = "Black Ice", artist = "AC/DC",
|
||||||
artistId = "362", coverArt = "al-618", songCount = 15, duration = 3331,
|
artistId = "362", coverArt = "al-618", songCount = 15, duration = 3331,
|
||||||
created = parseDate("2016-10-23T15:31:22.000Z"),
|
created = parseDate("2016-10-23T15:31:22.000Z"),
|
||||||
year = 2008, genre = "Hard Rock"
|
year = 2008, genre = "Hard Rock"
|
||||||
)
|
)
|
||||||
albumsList[1] `should equal` Album(
|
albumsList[1] `should be equal to` Album(
|
||||||
id = "617", name = "Rock or Bust", artist = "AC/DC",
|
id = "617", name = "Rock or Bust", artist = "AC/DC",
|
||||||
artistId = "362", coverArt = "al-617", songCount = 11, duration = 2095,
|
artistId = "362", coverArt = "al-617", songCount = 11, duration = 2095,
|
||||||
created = parseDate("2016-10-23T15:31:23.000Z"),
|
created = parseDate("2016-10-23T15:31:23.000Z"),
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic
|
package org.moire.ultrasonic.api.subsonic
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.amshove.kluent.`should not be`
|
import org.amshove.kluent.`should not be`
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.Artist
|
import org.moire.ultrasonic.api.subsonic.models.Artist
|
||||||
@ -19,7 +18,7 @@ class SubsonicApiGetArtistsTest : SubsonicAPIClientTest() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
response.indexes `should not be` null
|
response.indexes `should not be` null
|
||||||
response.indexes `should equal` Indexes()
|
response.indexes `should be equal to` Indexes()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -32,9 +31,9 @@ class SubsonicApiGetArtistsTest : SubsonicAPIClientTest() {
|
|||||||
with(response.body()!!.indexes) {
|
with(response.body()!!.indexes) {
|
||||||
lastModified `should be equal to` 0L
|
lastModified `should be equal to` 0L
|
||||||
ignoredArticles `should be equal to` "The El La Los Las Le Les"
|
ignoredArticles `should be equal to` "The El La Los Las Le Les"
|
||||||
shortcutList `should equal` emptyList()
|
shortcutList `should be equal to` emptyList()
|
||||||
indexList.size `should be equal to` 2
|
indexList.size `should be equal to` 2
|
||||||
indexList `should equal` listOf(
|
indexList `should be equal to` listOf(
|
||||||
Index(
|
Index(
|
||||||
name = "A",
|
name = "A",
|
||||||
artists = listOf(
|
artists = listOf(
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic
|
package org.moire.ultrasonic.api.subsonic
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
||||||
|
|
||||||
@ -15,7 +14,7 @@ class SubsonicApiGetBookmarksTest : SubsonicAPIClientTest() {
|
|||||||
client.api.getBookmarks().execute()
|
client.api.getBookmarks().execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
response.bookmarkList `should equal` emptyList()
|
response.bookmarkList `should be equal to` emptyList()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -30,9 +29,9 @@ class SubsonicApiGetBookmarksTest : SubsonicAPIClientTest() {
|
|||||||
position `should be equal to` 107914
|
position `should be equal to` 107914
|
||||||
username `should be equal to` "CaptainEurope"
|
username `should be equal to` "CaptainEurope"
|
||||||
comment `should be equal to` "Look at this"
|
comment `should be equal to` "Look at this"
|
||||||
created `should equal` parseDate("2017-11-18T15:22:22.144Z")
|
created `should be equal to` parseDate("2017-11-18T15:22:22.144Z")
|
||||||
changed `should equal` parseDate("2017-11-18T15:22:22.144Z")
|
changed `should be equal to` parseDate("2017-11-18T15:22:22.144Z")
|
||||||
entry `should equal` MusicDirectoryChild(
|
entry `should be equal to` MusicDirectoryChild(
|
||||||
id = "10349", parent = "10342",
|
id = "10349", parent = "10342",
|
||||||
isDir = false, title = "Amerika", album = "Home of the Strange",
|
isDir = false, title = "Amerika", album = "Home of the Strange",
|
||||||
artist = "Young the Giant", track = 1, year = 2016, genre = "Indie Rock",
|
artist = "Young the Giant", track = 1, year = 2016, genre = "Indie Rock",
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic
|
package org.moire.ultrasonic.api.subsonic
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.ChatMessage
|
import org.moire.ultrasonic.api.subsonic.models.ChatMessage
|
||||||
|
|
||||||
@ -15,7 +14,7 @@ class SubsonicApiGetChatMessagesTest : SubsonicAPIClientTest() {
|
|||||||
client.api.getChatMessages().execute()
|
client.api.getChatMessages().execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
response.chatMessages `should equal` emptyList()
|
response.chatMessages `should be equal to` emptyList()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -27,11 +26,11 @@ class SubsonicApiGetChatMessagesTest : SubsonicAPIClientTest() {
|
|||||||
assertResponseSuccessful(response)
|
assertResponseSuccessful(response)
|
||||||
with(response.body()!!.chatMessages) {
|
with(response.body()!!.chatMessages) {
|
||||||
size `should be equal to` 2
|
size `should be equal to` 2
|
||||||
this[0] `should equal` ChatMessage(
|
this[0] `should be equal to` ChatMessage(
|
||||||
username = "sindre", time = 1269771845310,
|
username = "sindre", time = 1269771845310,
|
||||||
message = "Sindre was here"
|
message = "Sindre was here"
|
||||||
)
|
)
|
||||||
this[1] `should equal` ChatMessage(
|
this[1] `should be equal to` ChatMessage(
|
||||||
username = "ben", time = 1269771842504,
|
username = "ben", time = 1269771842504,
|
||||||
message = "Ben too"
|
message = "Ben too"
|
||||||
)
|
)
|
||||||
|
@ -3,7 +3,6 @@ package org.moire.ultrasonic.api.subsonic
|
|||||||
import okhttp3.mockwebserver.MockResponse
|
import okhttp3.mockwebserver.MockResponse
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should be`
|
import org.amshove.kluent.`should be`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.amshove.kluent.`should not be`
|
import org.amshove.kluent.`should not be`
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
|
|
||||||
@ -20,7 +19,7 @@ class SubsonicApiGetCoverArtTest : SubsonicAPIClientTest() {
|
|||||||
with(response) {
|
with(response) {
|
||||||
stream `should be` null
|
stream `should be` null
|
||||||
responseHttpCode `should be equal to` 200
|
responseHttpCode `should be equal to` 200
|
||||||
apiError `should equal` SubsonicError.RequestedDataWasNotFound
|
apiError `should be equal to` SubsonicError.RequestedDataWasNotFound
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -33,7 +32,7 @@ class SubsonicApiGetCoverArtTest : SubsonicAPIClientTest() {
|
|||||||
|
|
||||||
with(response) {
|
with(response) {
|
||||||
stream `should be` null
|
stream `should be` null
|
||||||
responseHttpCode `should equal` 404
|
responseHttpCode `should be equal to` 404
|
||||||
apiError `should be` null
|
apiError `should be` null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic
|
package org.moire.ultrasonic.api.subsonic
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.Genre
|
import org.moire.ultrasonic.api.subsonic.models.Genre
|
||||||
|
|
||||||
@ -15,7 +14,7 @@ class SubsonicApiGetGenresTest : SubsonicAPIClientTest() {
|
|||||||
client.api.getGenres().execute()
|
client.api.getGenres().execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
response.genresList `should equal` emptyList()
|
response.genresList `should be equal to` emptyList()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -27,11 +26,11 @@ class SubsonicApiGetGenresTest : SubsonicAPIClientTest() {
|
|||||||
assertResponseSuccessful(response)
|
assertResponseSuccessful(response)
|
||||||
with(response.body()!!.genresList) {
|
with(response.body()!!.genresList) {
|
||||||
size `should be equal to` 5
|
size `should be equal to` 5
|
||||||
this[0] `should equal` Genre(1186, 103, "Rock")
|
this[0] `should be equal to` Genre(1186, 103, "Rock")
|
||||||
this[1] `should equal` Genre(896, 72, "Electronic")
|
this[1] `should be equal to` Genre(896, 72, "Electronic")
|
||||||
this[2] `should equal` Genre(790, 59, "Alternative Rock")
|
this[2] `should be equal to` Genre(790, 59, "Alternative Rock")
|
||||||
this[3] `should equal` Genre(622, 97, "Trance")
|
this[3] `should be equal to` Genre(622, 97, "Trance")
|
||||||
this[4] `should equal` Genre(476, 36, "Hard Rock")
|
this[4] `should be equal to` Genre(476, 36, "Hard Rock")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic
|
package org.moire.ultrasonic.api.subsonic
|
||||||
|
|
||||||
import org.amshove.kluent.`should equal`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should not be`
|
import org.amshove.kluent.`should not be`
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.Artist
|
import org.moire.ultrasonic.api.subsonic.models.Artist
|
||||||
@ -20,13 +20,13 @@ class SubsonicApiGetIndexesTest : SubsonicAPIClientTest() {
|
|||||||
assertResponseSuccessful(response)
|
assertResponseSuccessful(response)
|
||||||
response.body()!!.indexes `should not be` null
|
response.body()!!.indexes `should not be` null
|
||||||
with(response.body()!!.indexes) {
|
with(response.body()!!.indexes) {
|
||||||
lastModified `should equal` 1491069027523
|
lastModified `should be equal to` 1491069027523
|
||||||
ignoredArticles `should equal` "The El La Los Las Le Les"
|
ignoredArticles `should be equal to` "The El La Los Las Le Les"
|
||||||
shortcutList `should equal` listOf(
|
shortcutList `should be equal to` listOf(
|
||||||
Artist(id = "889", name = "podcasts"),
|
Artist(id = "889", name = "podcasts"),
|
||||||
Artist(id = "890", name = "audiobooks")
|
Artist(id = "890", name = "audiobooks")
|
||||||
)
|
)
|
||||||
indexList `should equal` mutableListOf(
|
indexList `should be equal to` mutableListOf(
|
||||||
Index(
|
Index(
|
||||||
"A",
|
"A",
|
||||||
listOf(
|
listOf(
|
||||||
@ -79,6 +79,6 @@ class SubsonicApiGetIndexesTest : SubsonicAPIClientTest() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
response.indexes `should not be` null
|
response.indexes `should not be` null
|
||||||
response.indexes `should equal` Indexes()
|
response.indexes `should be equal to` Indexes()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic
|
package org.moire.ultrasonic.api.subsonic
|
||||||
|
|
||||||
import org.amshove.kluent.`should equal`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should not be`
|
import org.amshove.kluent.`should not be`
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.License
|
import org.moire.ultrasonic.api.subsonic.models.License
|
||||||
@ -18,7 +18,7 @@ class SubsonicApiGetLicenseTest : SubsonicAPIClientTest() {
|
|||||||
assertResponseSuccessful(response)
|
assertResponseSuccessful(response)
|
||||||
with(response.body()!!) {
|
with(response.body()!!) {
|
||||||
assertBaseResponseOk()
|
assertBaseResponseOk()
|
||||||
license `should equal` License(
|
license `should be equal to` License(
|
||||||
valid = true,
|
valid = true,
|
||||||
trialExpires = parseDate("2016-11-23T20:17:15.206Z"),
|
trialExpires = parseDate("2016-11-23T20:17:15.206Z"),
|
||||||
email = "someone@example.net",
|
email = "someone@example.net",
|
||||||
@ -34,7 +34,7 @@ class SubsonicApiGetLicenseTest : SubsonicAPIClientTest() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
response.license `should not be` null
|
response.license `should not be` null
|
||||||
response.license.email `should equal` License().email
|
response.license.email `should be equal to` License().email
|
||||||
response.license.valid `should equal` License().valid
|
response.license.valid `should be equal to` License().valid
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@ package org.moire.ultrasonic.api.subsonic
|
|||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should be`
|
import org.amshove.kluent.`should be`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.amshove.kluent.`should not be`
|
import org.amshove.kluent.`should not be`
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.MusicDirectory
|
import org.moire.ultrasonic.api.subsonic.models.MusicDirectory
|
||||||
@ -19,7 +18,7 @@ class SubsonicApiGetMusicDirectoryTest : SubsonicAPIClientTest() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
response.musicDirectory `should not be` null
|
response.musicDirectory `should not be` null
|
||||||
response.musicDirectory `should equal` MusicDirectory()
|
response.musicDirectory `should be equal to` MusicDirectory()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -46,13 +45,13 @@ class SubsonicApiGetMusicDirectoryTest : SubsonicAPIClientTest() {
|
|||||||
with(response.body()!!.musicDirectory) {
|
with(response.body()!!.musicDirectory) {
|
||||||
id `should be equal to` "4836"
|
id `should be equal to` "4836"
|
||||||
parent `should be equal to` "300"
|
parent `should be equal to` "300"
|
||||||
name `should equal` "12 Stones"
|
name `should be equal to` "12 Stones"
|
||||||
userRating `should be equal to` 5
|
userRating `should be equal to` 5
|
||||||
averageRating `should be equal to` 5.0f
|
averageRating `should be equal to` 5.0f
|
||||||
starred `should equal` null
|
starred `should be equal to` null
|
||||||
playCount `should be equal to` 1
|
playCount `should be equal to` 1
|
||||||
childList.size `should be` 2
|
childList.size `should be` 2
|
||||||
childList[0] `should equal` MusicDirectoryChild(
|
childList[0] `should be equal to` MusicDirectoryChild(
|
||||||
id = "4844", parent = "4836",
|
id = "4844", parent = "4836",
|
||||||
isDir = false, title = "Crash", album = "12 Stones", artist = "12 Stones",
|
isDir = false, title = "Crash", album = "12 Stones", artist = "12 Stones",
|
||||||
track = 1, year = 2002, genre = "Alternative Rock", coverArt = "4836",
|
track = 1, year = 2002, genre = "Alternative Rock", coverArt = "4836",
|
||||||
@ -62,7 +61,7 @@ class SubsonicApiGetMusicDirectoryTest : SubsonicAPIClientTest() {
|
|||||||
created = parseDate("2016-10-23T15:19:10.000Z"),
|
created = parseDate("2016-10-23T15:19:10.000Z"),
|
||||||
albumId = "454", artistId = "288", type = "music"
|
albumId = "454", artistId = "288", type = "music"
|
||||||
)
|
)
|
||||||
childList[1] `should equal` MusicDirectoryChild(
|
childList[1] `should be equal to` MusicDirectoryChild(
|
||||||
id = "4845", parent = "4836",
|
id = "4845", parent = "4836",
|
||||||
isDir = false, title = "Broken", album = "12 Stones", artist = "12 Stones",
|
isDir = false, title = "Broken", album = "12 Stones", artist = "12 Stones",
|
||||||
track = 2, year = 2002, genre = "Alternative Rock", coverArt = "4836",
|
track = 2, year = 2002, genre = "Alternative Rock", coverArt = "4836",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic
|
package org.moire.ultrasonic.api.subsonic
|
||||||
|
|
||||||
import org.amshove.kluent.`should equal`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.MusicFolder
|
import org.moire.ultrasonic.api.subsonic.models.MusicFolder
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ class SubsonicApiGetMusicFoldersTest : SubsonicAPIClientTest() {
|
|||||||
assertResponseSuccessful(response)
|
assertResponseSuccessful(response)
|
||||||
with(response.body()!!) {
|
with(response.body()!!) {
|
||||||
assertBaseResponseOk()
|
assertBaseResponseOk()
|
||||||
musicFolders `should equal` listOf(
|
musicFolders `should be equal to` listOf(
|
||||||
MusicFolder("0", "Music"),
|
MusicFolder("0", "Music"),
|
||||||
MusicFolder("2", "Test")
|
MusicFolder("2", "Test")
|
||||||
)
|
)
|
||||||
@ -30,6 +30,6 @@ class SubsonicApiGetMusicFoldersTest : SubsonicAPIClientTest() {
|
|||||||
client.api.getMusicFolders().execute()
|
client.api.getMusicFolders().execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
response.musicFolders `should equal` emptyList()
|
response.musicFolders `should be equal to` emptyList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic
|
package org.moire.ultrasonic.api.subsonic
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.amshove.kluent.`should not be`
|
import org.amshove.kluent.`should not be`
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
||||||
@ -18,7 +17,7 @@ class SubsonicApiGetPlaylistTest : SubsonicAPIClientTest() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
response.playlist `should not be` null
|
response.playlist `should not be` null
|
||||||
response.playlist `should equal` Playlist()
|
response.playlist `should be equal to` Playlist()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -35,11 +34,11 @@ class SubsonicApiGetPlaylistTest : SubsonicAPIClientTest() {
|
|||||||
public `should be equal to` false
|
public `should be equal to` false
|
||||||
songCount `should be equal to` 16
|
songCount `should be equal to` 16
|
||||||
duration `should be equal to` 3573
|
duration `should be equal to` 3573
|
||||||
created `should equal` parseDate("2017-08-27T11:17:26.216Z")
|
created `should be equal to` parseDate("2017-08-27T11:17:26.216Z")
|
||||||
changed `should equal` parseDate("2017-08-27T11:17:26.218Z")
|
changed `should be equal to` parseDate("2017-08-27T11:17:26.218Z")
|
||||||
coverArt `should be equal to` "pl-0"
|
coverArt `should be equal to` "pl-0"
|
||||||
entriesList.size `should be equal to` 2
|
entriesList.size `should be equal to` 2
|
||||||
entriesList[1] `should equal` MusicDirectoryChild(
|
entriesList[1] `should be equal to` MusicDirectoryChild(
|
||||||
id = "4215", parent = "4186",
|
id = "4215", parent = "4186",
|
||||||
isDir = false, title = "Going to Hell", album = "Going to Hell",
|
isDir = false, title = "Going to Hell", album = "Going to Hell",
|
||||||
artist = "The Pretty Reckless", track = 2, year = 2014,
|
artist = "The Pretty Reckless", track = 2, year = 2014,
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic
|
package org.moire.ultrasonic.api.subsonic
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.amshove.kluent.`should not be`
|
import org.amshove.kluent.`should not be`
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
||||||
@ -17,7 +16,7 @@ class SubsonicApiGetPodcastsTest : SubsonicAPIClientTest() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
response.podcastChannels `should not be` null
|
response.podcastChannels `should not be` null
|
||||||
response.podcastChannels `should equal` emptyList()
|
response.podcastChannels `should be equal to` emptyList()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -41,7 +40,7 @@ class SubsonicApiGetPodcastsTest : SubsonicAPIClientTest() {
|
|||||||
status `should be equal to` "completed"
|
status `should be equal to` "completed"
|
||||||
errorMessage `should be equal to` ""
|
errorMessage `should be equal to` ""
|
||||||
episodeList.size `should be equal to` 10
|
episodeList.size `should be equal to` 10
|
||||||
episodeList[0] `should equal` MusicDirectoryChild(
|
episodeList[0] `should be equal to` MusicDirectoryChild(
|
||||||
id = "148", parent = "9959",
|
id = "148", parent = "9959",
|
||||||
isDir = false,
|
isDir = false,
|
||||||
title = "S1:EP3 – How to teach yourself computer science (Vaidehi Joshi)",
|
title = "S1:EP3 – How to teach yourself computer science (Vaidehi Joshi)",
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic
|
package org.moire.ultrasonic.api.subsonic
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
||||||
|
|
||||||
@ -15,7 +14,7 @@ class SubsonicApiGetRandomSongsTest : SubsonicAPIClientTest() {
|
|||||||
client.api.getRandomSongs().execute()
|
client.api.getRandomSongs().execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
response.songsList `should equal` emptyList()
|
response.songsList `should be equal to` emptyList()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -27,7 +26,7 @@ class SubsonicApiGetRandomSongsTest : SubsonicAPIClientTest() {
|
|||||||
assertResponseSuccessful(response)
|
assertResponseSuccessful(response)
|
||||||
with(response.body()!!.songsList) {
|
with(response.body()!!.songsList) {
|
||||||
size `should be equal to` 3
|
size `should be equal to` 3
|
||||||
this[1] `should equal` MusicDirectoryChild(
|
this[1] `should be equal to` MusicDirectoryChild(
|
||||||
id = "3061", parent = "3050", isDir = false,
|
id = "3061", parent = "3050", isDir = false,
|
||||||
title = "Sure as Hell", album = "Who Are You Now?", artist = "This Providence",
|
title = "Sure as Hell", album = "Who Are You Now?", artist = "This Providence",
|
||||||
track = 1, year = 2009, genre = "Indie Rock", coverArt = "3050",
|
track = 1, year = 2009, genre = "Indie Rock", coverArt = "3050",
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic
|
package org.moire.ultrasonic.api.subsonic
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
||||||
|
|
||||||
@ -15,7 +14,7 @@ class SubsonicApiGetSharesTest : SubsonicAPIClientTest() {
|
|||||||
client.api.getShares().execute()
|
client.api.getShares().execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
response.shares `should equal` emptyList()
|
response.shares `should be equal to` emptyList()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -32,13 +31,13 @@ class SubsonicApiGetSharesTest : SubsonicAPIClientTest() {
|
|||||||
"NiJ9.eyJwYXRoIjoiL2V4dC9zaGFyZS9hd2R3byIsImV4cCI6MTU0MTYyNjQzMX0.iy8dkt_ZZc8" +
|
"NiJ9.eyJwYXRoIjoiL2V4dC9zaGFyZS9hd2R3byIsImV4cCI6MTU0MTYyNjQzMX0.iy8dkt_ZZc8" +
|
||||||
"hJ692UxorHdHWFU2RB-fMCmCA4IJ_dTw"
|
"hJ692UxorHdHWFU2RB-fMCmCA4IJ_dTw"
|
||||||
username `should be equal to` "admin"
|
username `should be equal to` "admin"
|
||||||
created `should equal` parseDate("2017-11-07T21:33:51.748Z")
|
created `should be equal to` parseDate("2017-11-07T21:33:51.748Z")
|
||||||
expires `should equal` parseDate("2018-11-07T21:33:51.748Z")
|
expires `should be equal to` parseDate("2018-11-07T21:33:51.748Z")
|
||||||
lastVisited `should equal` parseDate("2018-11-07T21:33:51.748Z")
|
lastVisited `should be equal to` parseDate("2018-11-07T21:33:51.748Z")
|
||||||
visitCount `should be equal to` 0
|
visitCount `should be equal to` 0
|
||||||
description `should be equal to` "Awesome link!"
|
description `should be equal to` "Awesome link!"
|
||||||
items.size `should be equal to` 1
|
items.size `should be equal to` 1
|
||||||
items[0] `should equal` MusicDirectoryChild(
|
items[0] `should be equal to` MusicDirectoryChild(
|
||||||
id = "4212", parent = "4186", isDir = false,
|
id = "4212", parent = "4186", isDir = false,
|
||||||
title = "Heaven Knows", album = "Going to Hell", artist = "The Pretty Reckless",
|
title = "Heaven Knows", album = "Going to Hell", artist = "The Pretty Reckless",
|
||||||
track = 3, year = 2014, genre = "Hard Rock", coverArt = "4186", size = 9025090,
|
track = 3, year = 2014, genre = "Hard Rock", coverArt = "4186", size = 9025090,
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic
|
package org.moire.ultrasonic.api.subsonic
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
||||||
|
|
||||||
@ -15,7 +14,7 @@ class SubsonicApiGetSongsByGenreTest : SubsonicAPIClientTest() {
|
|||||||
client.api.getSongsByGenre("Metal").execute()
|
client.api.getSongsByGenre("Metal").execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
response.songsList `should equal` emptyList()
|
response.songsList `should be equal to` emptyList()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -27,7 +26,7 @@ class SubsonicApiGetSongsByGenreTest : SubsonicAPIClientTest() {
|
|||||||
assertResponseSuccessful(response)
|
assertResponseSuccessful(response)
|
||||||
response.body()!!.songsList.size `should be equal to` 2
|
response.body()!!.songsList.size `should be equal to` 2
|
||||||
with(response.body()!!.songsList) {
|
with(response.body()!!.songsList) {
|
||||||
this[0] `should equal` MusicDirectoryChild(
|
this[0] `should be equal to` MusicDirectoryChild(
|
||||||
id = "575", parent = "576", isDir = false,
|
id = "575", parent = "576", isDir = false,
|
||||||
title = "Time Machine (Vadim Zhukov Remix)", album = "668",
|
title = "Time Machine (Vadim Zhukov Remix)", album = "668",
|
||||||
artist = "Tasadi", year = 2008, genre = "Trance", size = 22467672,
|
artist = "Tasadi", year = 2008, genre = "Trance", size = 22467672,
|
||||||
@ -36,7 +35,7 @@ class SubsonicApiGetSongsByGenreTest : SubsonicAPIClientTest() {
|
|||||||
isVideo = false, playCount = 0, created = parseDate("2016-10-23T21:58:29.000Z"),
|
isVideo = false, playCount = 0, created = parseDate("2016-10-23T21:58:29.000Z"),
|
||||||
albumId = "0", artistId = "0", type = "music"
|
albumId = "0", artistId = "0", type = "music"
|
||||||
)
|
)
|
||||||
this[1] `should equal` MusicDirectoryChild(
|
this[1] `should be equal to` MusicDirectoryChild(
|
||||||
id = "621", parent = "622", isDir = false,
|
id = "621", parent = "622", isDir = false,
|
||||||
title = "My Heart (Vadim Zhukov Remix)", album = "668",
|
title = "My Heart (Vadim Zhukov Remix)", album = "668",
|
||||||
artist = "DJ Polyakov PPK Feat Kate Cameron", year = 2009, genre = "Trance",
|
artist = "DJ Polyakov PPK Feat Kate Cameron", year = 2009, genre = "Trance",
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic
|
package org.moire.ultrasonic.api.subsonic
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.Artist
|
import org.moire.ultrasonic.api.subsonic.models.Artist
|
||||||
import org.moire.ultrasonic.api.subsonic.models.SearchTwoResult
|
import org.moire.ultrasonic.api.subsonic.models.SearchTwoResult
|
||||||
@ -17,7 +16,7 @@ class SubsonicApiGetStarred2Test : SubsonicAPIClientTest() {
|
|||||||
client.api.getStarred2().execute()
|
client.api.getStarred2().execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
response.starred2 `should equal` SearchTwoResult()
|
response.starred2 `should be equal to` SearchTwoResult()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -28,13 +27,13 @@ class SubsonicApiGetStarred2Test : SubsonicAPIClientTest() {
|
|||||||
|
|
||||||
assertResponseSuccessful(response)
|
assertResponseSuccessful(response)
|
||||||
with(response.body()!!.starred2) {
|
with(response.body()!!.starred2) {
|
||||||
albumList `should equal` emptyList()
|
albumList `should be equal to` emptyList()
|
||||||
artistList.size `should be equal to` 1
|
artistList.size `should be equal to` 1
|
||||||
artistList[0] `should equal` Artist(
|
artistList[0] `should be equal to` Artist(
|
||||||
id = "364", name = "Parov Stelar",
|
id = "364", name = "Parov Stelar",
|
||||||
starred = parseDate("2017-08-12T18:32:58.768Z")
|
starred = parseDate("2017-08-12T18:32:58.768Z")
|
||||||
)
|
)
|
||||||
songList `should equal` emptyList()
|
songList `should be equal to` emptyList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic
|
package org.moire.ultrasonic.api.subsonic
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.Artist
|
import org.moire.ultrasonic.api.subsonic.models.Artist
|
||||||
import org.moire.ultrasonic.api.subsonic.models.SearchTwoResult
|
import org.moire.ultrasonic.api.subsonic.models.SearchTwoResult
|
||||||
@ -16,7 +15,7 @@ class SubsonicApiGetStarredTest : SubsonicAPIClientTest() {
|
|||||||
client.api.getStarred().execute()
|
client.api.getStarred().execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
response.starred `should equal` SearchTwoResult()
|
response.starred `should be equal to` SearchTwoResult()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -27,13 +26,13 @@ class SubsonicApiGetStarredTest : SubsonicAPIClientTest() {
|
|||||||
|
|
||||||
assertResponseSuccessful(response)
|
assertResponseSuccessful(response)
|
||||||
with(response.body()!!.starred) {
|
with(response.body()!!.starred) {
|
||||||
albumList `should equal` emptyList()
|
albumList `should be equal to` emptyList()
|
||||||
artistList.size `should be equal to` 1
|
artistList.size `should be equal to` 1
|
||||||
artistList[0] `should equal` Artist(
|
artistList[0] `should be equal to` Artist(
|
||||||
id = "364", name = "Parov Stelar",
|
id = "364", name = "Parov Stelar",
|
||||||
starred = parseDate("2017-08-12T18:32:58.768Z")
|
starred = parseDate("2017-08-12T18:32:58.768Z")
|
||||||
)
|
)
|
||||||
songList `should equal` emptyList()
|
songList `should be equal to` emptyList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic
|
package org.moire.ultrasonic.api.subsonic
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.User
|
import org.moire.ultrasonic.api.subsonic.models.User
|
||||||
|
|
||||||
@ -15,7 +14,7 @@ class SubsonicApiGetUserTest : SubsonicAPIClientTest() {
|
|||||||
client.api.getUser("some").execute()
|
client.api.getUser("some").execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
response.user `should equal` User()
|
response.user `should be equal to` User()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic
|
package org.moire.ultrasonic.api.subsonic
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
||||||
|
|
||||||
@ -15,7 +14,7 @@ class SubsonicApiGetVideosListTest : SubsonicAPIClientTest() {
|
|||||||
client.api.getVideos().execute()
|
client.api.getVideos().execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
response.videosList `should equal` emptyList()
|
response.videosList `should be equal to` emptyList()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -27,7 +26,7 @@ class SubsonicApiGetVideosListTest : SubsonicAPIClientTest() {
|
|||||||
assertResponseSuccessful(response)
|
assertResponseSuccessful(response)
|
||||||
with(response.body()!!.videosList) {
|
with(response.body()!!.videosList) {
|
||||||
size `should be equal to` 1
|
size `should be equal to` 1
|
||||||
this[0] `should equal` MusicDirectoryChild(
|
this[0] `should be equal to` MusicDirectoryChild(
|
||||||
id = "10402", parent = "10401",
|
id = "10402", parent = "10401",
|
||||||
isDir = false, title = "MVI_0512", album = "Incoming", size = 21889646,
|
isDir = false, title = "MVI_0512", album = "Incoming", size = 21889646,
|
||||||
contentType = "video/avi", suffix = "avi",
|
contentType = "video/avi", suffix = "avi",
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic
|
package org.moire.ultrasonic.api.subsonic
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.JukeboxAction
|
import org.moire.ultrasonic.api.subsonic.models.JukeboxAction
|
||||||
import org.moire.ultrasonic.api.subsonic.models.JukeboxAction.GET
|
import org.moire.ultrasonic.api.subsonic.models.JukeboxAction.GET
|
||||||
@ -19,7 +18,7 @@ class SubsonicApiJukeboxControlTest : SubsonicAPIClientTest() {
|
|||||||
client.api.jukeboxControl(GET).execute()
|
client.api.jukeboxControl(GET).execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
response.jukebox `should equal` JukeboxStatus()
|
response.jukebox `should be equal to` JukeboxStatus()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -34,7 +33,7 @@ class SubsonicApiJukeboxControlTest : SubsonicAPIClientTest() {
|
|||||||
playing `should be equal to` true
|
playing `should be equal to` true
|
||||||
gain `should be equal to` 0.32f
|
gain `should be equal to` 0.32f
|
||||||
position `should be equal to` 3
|
position `should be equal to` 3
|
||||||
playlistEntries `should equal` emptyList()
|
playlistEntries `should be equal to` emptyList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,7 +50,7 @@ class SubsonicApiJukeboxControlTest : SubsonicAPIClientTest() {
|
|||||||
gain `should be equal to` 0.88f
|
gain `should be equal to` 0.88f
|
||||||
position `should be equal to` 2
|
position `should be equal to` 2
|
||||||
playlistEntries.size `should be equal to` 2
|
playlistEntries.size `should be equal to` 2
|
||||||
playlistEntries[1] `should equal` MusicDirectoryChild(
|
playlistEntries[1] `should be equal to` MusicDirectoryChild(
|
||||||
id = "4215", parent = "4186",
|
id = "4215", parent = "4186",
|
||||||
isDir = false, title = "Going to Hell", album = "Going to Hell",
|
isDir = false, title = "Going to Hell", album = "Going to Hell",
|
||||||
artist = "The Pretty Reckless", track = 2, year = 2014, genre = "Hard Rock",
|
artist = "The Pretty Reckless", track = 2, year = 2014, genre = "Hard Rock",
|
||||||
|
@ -45,7 +45,7 @@ class SubsonicApiSSLTest {
|
|||||||
certificatePkcs12Stream: InputStream,
|
certificatePkcs12Stream: InputStream,
|
||||||
password: String
|
password: String
|
||||||
): SSLContext {
|
): SSLContext {
|
||||||
var cert: X509Certificate? = null
|
var cert: X509Certificate?
|
||||||
val trustStore = KeyStore.getInstance(KeyStore.getDefaultType())
|
val trustStore = KeyStore.getInstance(KeyStore.getDefaultType())
|
||||||
trustStore.load(null)
|
trustStore.load(null)
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@ package org.moire.ultrasonic.api.subsonic
|
|||||||
|
|
||||||
import java.util.Calendar
|
import java.util.Calendar
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.amshove.kluent.`should not be`
|
import org.amshove.kluent.`should not be`
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
||||||
@ -19,7 +18,7 @@ class SubsonicApiSearchTest : SubsonicAPIClientTest() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
response.searchResult `should not be` null
|
response.searchResult `should not be` null
|
||||||
response.searchResult `should equal` SearchResult()
|
response.searchResult `should be equal to` SearchResult()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -33,7 +32,7 @@ class SubsonicApiSearchTest : SubsonicAPIClientTest() {
|
|||||||
offset `should be equal to` 10
|
offset `should be equal to` 10
|
||||||
totalHits `should be equal to` 53
|
totalHits `should be equal to` 53
|
||||||
matchList.size `should be equal to` 1
|
matchList.size `should be equal to` 1
|
||||||
matchList[0] `should equal` MusicDirectoryChild(
|
matchList[0] `should be equal to` MusicDirectoryChild(
|
||||||
id = "5831", parent = "5766",
|
id = "5831", parent = "5766",
|
||||||
isDir = false, title = "You'll Be Under My Wheels",
|
isDir = false, title = "You'll Be Under My Wheels",
|
||||||
album = "Need for Speed Most Wanted", artist = "The Prodigy",
|
album = "Need for Speed Most Wanted", artist = "The Prodigy",
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic
|
package org.moire.ultrasonic.api.subsonic
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.amshove.kluent.`should not be`
|
import org.amshove.kluent.`should not be`
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.Album
|
import org.moire.ultrasonic.api.subsonic.models.Album
|
||||||
@ -20,7 +19,7 @@ class SubsonicApiSearchThreeTest : SubsonicAPIClientTest() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
response.searchResult `should not be` null
|
response.searchResult `should not be` null
|
||||||
response.searchResult `should equal` SearchThreeResult()
|
response.searchResult `should be equal to` SearchThreeResult()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -32,12 +31,12 @@ class SubsonicApiSearchThreeTest : SubsonicAPIClientTest() {
|
|||||||
assertResponseSuccessful(response)
|
assertResponseSuccessful(response)
|
||||||
with(response.body()!!.searchResult) {
|
with(response.body()!!.searchResult) {
|
||||||
artistList.size `should be equal to` 1
|
artistList.size `should be equal to` 1
|
||||||
artistList[0] `should equal` Artist(
|
artistList[0] `should be equal to` Artist(
|
||||||
id = "505", name = "The Prodigy",
|
id = "505", name = "The Prodigy",
|
||||||
coverArt = "ar-505", albumCount = 5
|
coverArt = "ar-505", albumCount = 5
|
||||||
)
|
)
|
||||||
albumList.size `should be equal to` 1
|
albumList.size `should be equal to` 1
|
||||||
albumList[0] `should equal` Album(
|
albumList[0] `should be equal to` Album(
|
||||||
id = "855",
|
id = "855",
|
||||||
name = "Always Outnumbered, Never Outgunned",
|
name = "Always Outnumbered, Never Outgunned",
|
||||||
artist = "The Prodigy", artistId = "505", coverArt = "al-855", songCount = 12,
|
artist = "The Prodigy", artistId = "505", coverArt = "al-855", songCount = 12,
|
||||||
@ -45,7 +44,7 @@ class SubsonicApiSearchThreeTest : SubsonicAPIClientTest() {
|
|||||||
year = 2004, genre = "Electronic"
|
year = 2004, genre = "Electronic"
|
||||||
)
|
)
|
||||||
songList.size `should be equal to` 1
|
songList.size `should be equal to` 1
|
||||||
songList[0] `should equal` MusicDirectoryChild(
|
songList[0] `should be equal to` MusicDirectoryChild(
|
||||||
id = "5831", parent = "5766",
|
id = "5831", parent = "5766",
|
||||||
isDir = false,
|
isDir = false,
|
||||||
title = "You'll Be Under My Wheels", album = "Need for Speed Most Wanted",
|
title = "You'll Be Under My Wheels", album = "Need for Speed Most Wanted",
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic
|
package org.moire.ultrasonic.api.subsonic
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.amshove.kluent.`should not be`
|
import org.amshove.kluent.`should not be`
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.Artist
|
import org.moire.ultrasonic.api.subsonic.models.Artist
|
||||||
@ -19,7 +18,7 @@ class SubsonicApiSearchTwoTest : SubsonicAPIClientTest() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
response.searchResult `should not be` null
|
response.searchResult `should not be` null
|
||||||
response.searchResult `should equal` SearchTwoResult()
|
response.searchResult `should be equal to` SearchTwoResult()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -31,9 +30,9 @@ class SubsonicApiSearchTwoTest : SubsonicAPIClientTest() {
|
|||||||
assertResponseSuccessful(response)
|
assertResponseSuccessful(response)
|
||||||
with(response.body()!!.searchResult) {
|
with(response.body()!!.searchResult) {
|
||||||
artistList.size `should be equal to` 1
|
artistList.size `should be equal to` 1
|
||||||
artistList[0] `should equal` Artist(id = "522", name = "The Prodigy")
|
artistList[0] `should be equal to` Artist(id = "522", name = "The Prodigy")
|
||||||
albumList.size `should be equal to` 1
|
albumList.size `should be equal to` 1
|
||||||
albumList[0] `should equal` MusicDirectoryChild(
|
albumList[0] `should be equal to` MusicDirectoryChild(
|
||||||
id = "8867", parent = "522",
|
id = "8867", parent = "522",
|
||||||
isDir = true, title = "Always Outnumbered, Never Outgunned",
|
isDir = true, title = "Always Outnumbered, Never Outgunned",
|
||||||
album = "Always Outnumbered, Never Outgunned", artist = "The Prodigy",
|
album = "Always Outnumbered, Never Outgunned", artist = "The Prodigy",
|
||||||
@ -41,7 +40,7 @@ class SubsonicApiSearchTwoTest : SubsonicAPIClientTest() {
|
|||||||
created = parseDate("2016-10-23T20:57:27.000Z")
|
created = parseDate("2016-10-23T20:57:27.000Z")
|
||||||
)
|
)
|
||||||
songList.size `should be equal to` 1
|
songList.size `should be equal to` 1
|
||||||
songList[0] `should equal` MusicDirectoryChild(
|
songList[0] `should be equal to` MusicDirectoryChild(
|
||||||
id = "5831", parent = "5766",
|
id = "5831", parent = "5766",
|
||||||
isDir = false,
|
isDir = false,
|
||||||
title = "You'll Be Under My Wheels", album = "Need for Speed Most Wanted",
|
title = "You'll Be Under My Wheels", album = "Need for Speed Most Wanted",
|
||||||
|
@ -3,7 +3,6 @@ package org.moire.ultrasonic.api.subsonic
|
|||||||
import okhttp3.mockwebserver.MockResponse
|
import okhttp3.mockwebserver.MockResponse
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should be`
|
import org.amshove.kluent.`should be`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.amshove.kluent.`should not be`
|
import org.amshove.kluent.`should not be`
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
|
|
||||||
@ -20,7 +19,7 @@ class SubsonicApiStreamTest : SubsonicAPIClientTest() {
|
|||||||
with(response) {
|
with(response) {
|
||||||
stream `should be` null
|
stream `should be` null
|
||||||
responseHttpCode `should be equal to` 200
|
responseHttpCode `should be equal to` 200
|
||||||
apiError `should equal` SubsonicError.RequestedDataWasNotFound
|
apiError `should be equal to` SubsonicError.RequestedDataWasNotFound
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic
|
package org.moire.ultrasonic.api.subsonic
|
||||||
|
|
||||||
import org.amshove.kluent.`should equal`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.junit.runner.RunWith
|
import org.junit.runner.RunWith
|
||||||
import org.junit.runners.Parameterized
|
import org.junit.runners.Parameterized
|
||||||
@ -20,7 +20,7 @@ class SubsonicAPIVersionsTest(private val apiVersion: SubsonicAPIVersions) {
|
|||||||
fun `Should proper convert api version to enum`() {
|
fun `Should proper convert api version to enum`() {
|
||||||
SubsonicAPIVersions.getClosestKnownClientApiVersion(
|
SubsonicAPIVersions.getClosestKnownClientApiVersion(
|
||||||
apiVersion.restApiVersion
|
apiVersion.restApiVersion
|
||||||
) `should equal` apiVersion
|
) `should be equal to` apiVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = IllegalArgumentException::class)
|
@Test(expected = IllegalArgumentException::class)
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic.models
|
package org.moire.ultrasonic.api.subsonic.models
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.amshove.kluent.`should throw`
|
import org.amshove.kluent.`should throw`
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
|
|
||||||
@ -15,7 +14,7 @@ class AlbumListTypeTest {
|
|||||||
|
|
||||||
val albumListType = AlbumListType.fromName(type)
|
val albumListType = AlbumListType.fromName(type)
|
||||||
|
|
||||||
albumListType `should equal` AlbumListType.SORTED_BY_NAME
|
albumListType `should be equal to` AlbumListType.SORTED_BY_NAME
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -30,7 +29,7 @@ class AlbumListTypeTest {
|
|||||||
@Test
|
@Test
|
||||||
fun `Should convert type string to corresponding AlbumListType`() {
|
fun `Should convert type string to corresponding AlbumListType`() {
|
||||||
AlbumListType.values().forEach {
|
AlbumListType.values().forEach {
|
||||||
AlbumListType.fromName(it.typeName) `should equal` it
|
AlbumListType.fromName(it.typeName) `should be equal to` it
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package org.moire.ultrasonic.api.subsonic.models
|
package org.moire.ultrasonic.api.subsonic.models
|
||||||
|
|
||||||
import org.amshove.kluent.`should equal`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.junit.runner.RunWith
|
import org.junit.runner.RunWith
|
||||||
import org.junit.runners.Parameterized
|
import org.junit.runners.Parameterized
|
||||||
@ -19,7 +19,7 @@ class StatusTest(private val status: SubsonicResponse.Status) {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `Should proper parse response status`() {
|
fun `Should proper parse response status`() {
|
||||||
SubsonicResponse.Status.getStatusFromJson(status.jsonValue) `should equal` status
|
SubsonicResponse.Status.getStatusFromJson(status.jsonValue) `should be equal to` status
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = IllegalArgumentException::class)
|
@Test(expected = IllegalArgumentException::class)
|
||||||
|
@ -4,7 +4,6 @@ package org.moire.ultrasonic.domain
|
|||||||
|
|
||||||
import java.util.Calendar
|
import java.util.Calendar
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.Album
|
import org.moire.ultrasonic.api.subsonic.models.Album
|
||||||
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
||||||
@ -24,17 +23,17 @@ class APIAlbumConverterTest {
|
|||||||
val convertedEntity = entity.toDomainEntity()
|
val convertedEntity = entity.toDomainEntity()
|
||||||
|
|
||||||
with(convertedEntity) {
|
with(convertedEntity) {
|
||||||
id `should equal` entity.id
|
id `should be equal to` entity.id
|
||||||
title `should equal` entity.name
|
title `should be equal to` entity.name
|
||||||
isDirectory `should equal` true
|
isDirectory `should be equal to` true
|
||||||
coverArt `should equal` entity.coverArt
|
coverArt `should be equal to` entity.coverArt
|
||||||
artist `should equal` entity.artist
|
artist `should be equal to` entity.artist
|
||||||
artistId `should equal` entity.artistId
|
artistId `should be equal to` entity.artistId
|
||||||
songCount `should equal` entity.songCount.toLong()
|
songCount `should be equal to` entity.songCount.toLong()
|
||||||
duration `should equal` entity.duration
|
duration `should be equal to` entity.duration
|
||||||
created `should equal` entity.created?.time
|
created `should be equal to` entity.created?.time
|
||||||
year `should equal` entity.year
|
year `should be equal to` entity.year
|
||||||
genre `should equal` entity.genre
|
genre `should be equal to` entity.genre
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,9 +49,9 @@ class APIAlbumConverterTest {
|
|||||||
val convertedEntity = entity.toMusicDirectoryDomainEntity()
|
val convertedEntity = entity.toMusicDirectoryDomainEntity()
|
||||||
|
|
||||||
with(convertedEntity) {
|
with(convertedEntity) {
|
||||||
name `should equal` null
|
name `should be equal to` null
|
||||||
getChildren().size `should be equal to` entity.songList.size
|
getChildren().size `should be equal to` entity.songList.size
|
||||||
getChildren()[0] `should equal` entity.songList[0].toDomainEntity()
|
getChildren()[0] `should be equal to` entity.songList[0].toDomainEntity()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,7 +64,7 @@ class APIAlbumConverterTest {
|
|||||||
with(convertedList) {
|
with(convertedList) {
|
||||||
size `should be equal to` entityList.size
|
size `should be equal to` entityList.size
|
||||||
forEachIndexed { index, entry ->
|
forEachIndexed { index, entry ->
|
||||||
entry `should equal` entityList[index].toDomainEntity()
|
entry `should be equal to` entityList[index].toDomainEntity()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
package org.moire.ultrasonic.domain
|
package org.moire.ultrasonic.domain
|
||||||
|
|
||||||
import java.util.Calendar
|
import java.util.Calendar
|
||||||
import org.amshove.kluent.`should equal`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.Album
|
import org.moire.ultrasonic.api.subsonic.models.Album
|
||||||
import org.moire.ultrasonic.api.subsonic.models.Artist
|
import org.moire.ultrasonic.api.subsonic.models.Artist
|
||||||
@ -19,8 +19,8 @@ class APIArtistConverterTest {
|
|||||||
val convertedEntity = entity.toDomainEntity()
|
val convertedEntity = entity.toDomainEntity()
|
||||||
|
|
||||||
with(convertedEntity) {
|
with(convertedEntity) {
|
||||||
id `should equal` entity.id
|
id `should be equal to` entity.id
|
||||||
name `should equal` entity.name
|
name `should be equal to` entity.name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,8 +41,8 @@ class APIArtistConverterTest {
|
|||||||
val convertedEntity = entity.toMusicDirectoryDomainEntity()
|
val convertedEntity = entity.toMusicDirectoryDomainEntity()
|
||||||
|
|
||||||
with(convertedEntity) {
|
with(convertedEntity) {
|
||||||
name `should equal` entity.name
|
name `should be equal to` entity.name
|
||||||
getAllChild() `should equal` entity.albumsList
|
getAllChild() `should be equal to` entity.albumsList
|
||||||
.map { it.toDomainEntity() }.toMutableList()
|
.map { it.toDomainEntity() }.toMutableList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,6 @@ package org.moire.ultrasonic.domain
|
|||||||
|
|
||||||
import java.util.Calendar
|
import java.util.Calendar
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.Bookmark
|
import org.moire.ultrasonic.api.subsonic.models.Bookmark
|
||||||
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
||||||
@ -24,11 +23,11 @@ class APIBookmarkConverterTest {
|
|||||||
|
|
||||||
with(domainEntity) {
|
with(domainEntity) {
|
||||||
position `should be equal to` entity.position.toInt()
|
position `should be equal to` entity.position.toInt()
|
||||||
username `should equal` entity.username
|
username `should be equal to` entity.username
|
||||||
comment `should equal` entity.comment
|
comment `should be equal to` entity.comment
|
||||||
created `should equal` entity.created?.time
|
created `should be equal to` entity.created?.time
|
||||||
changed `should equal` entity.changed?.time
|
changed `should be equal to` entity.changed?.time
|
||||||
entry `should equal` entity.entry.toDomainEntity()
|
entry `should be equal to` entity.entry.toDomainEntity()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,7 +39,7 @@ class APIBookmarkConverterTest {
|
|||||||
|
|
||||||
domainEntitiesList.size `should be equal to` entitiesList.size
|
domainEntitiesList.size `should be equal to` entitiesList.size
|
||||||
domainEntitiesList.forEachIndexed({ index, bookmark ->
|
domainEntitiesList.forEachIndexed({ index, bookmark ->
|
||||||
bookmark `should equal` entitiesList[index].toDomainEntity()
|
bookmark `should be equal to` entitiesList[index].toDomainEntity()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
package org.moire.ultrasonic.domain
|
package org.moire.ultrasonic.domain
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.ChatMessage
|
import org.moire.ultrasonic.api.subsonic.models.ChatMessage
|
||||||
|
|
||||||
@ -18,9 +17,9 @@ class APIChatMessageConverterTest {
|
|||||||
val domainEntity = entity.toDomainEntity()
|
val domainEntity = entity.toDomainEntity()
|
||||||
|
|
||||||
with(domainEntity) {
|
with(domainEntity) {
|
||||||
username `should equal` entity.username
|
username `should be equal to` entity.username
|
||||||
time `should equal` entity.time
|
time `should be equal to` entity.time
|
||||||
message `should equal` entity.message
|
message `should be equal to` entity.message
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -33,7 +32,7 @@ class APIChatMessageConverterTest {
|
|||||||
with(domainEntitiesList) {
|
with(domainEntitiesList) {
|
||||||
size `should be equal to` entitiesList.size
|
size `should be equal to` entitiesList.size
|
||||||
forEachIndexed { index, chatMessage ->
|
forEachIndexed { index, chatMessage ->
|
||||||
chatMessage `should equal` entitiesList[index].toDomainEntity()
|
chatMessage `should be equal to` entitiesList[index].toDomainEntity()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
package org.moire.ultrasonic.domain
|
package org.moire.ultrasonic.domain
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.Artist
|
import org.moire.ultrasonic.api.subsonic.models.Artist
|
||||||
import org.moire.ultrasonic.api.subsonic.models.Index
|
import org.moire.ultrasonic.api.subsonic.models.Index
|
||||||
@ -39,8 +38,8 @@ class APIIndexesConverterTest {
|
|||||||
lastModified `should be equal to` entity.lastModified
|
lastModified `should be equal to` entity.lastModified
|
||||||
ignoredArticles `should be equal to` entity.ignoredArticles
|
ignoredArticles `should be equal to` entity.ignoredArticles
|
||||||
artists.size `should be equal to` expectedArtists.size
|
artists.size `should be equal to` expectedArtists.size
|
||||||
artists `should equal` expectedArtists
|
artists `should be equal to` expectedArtists
|
||||||
shortcuts `should equal` artistsA.map { it.toDomainEntity() }.toMutableList()
|
shortcuts `should be equal to` artistsA.map { it.toDomainEntity() }.toMutableList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
package org.moire.ultrasonic.domain
|
package org.moire.ultrasonic.domain
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.JukeboxStatus
|
import org.moire.ultrasonic.api.subsonic.models.JukeboxStatus
|
||||||
|
|
||||||
@ -18,10 +17,10 @@ class APIJukeboxConverterTest {
|
|||||||
val convertedEntity = entity.toDomainEntity()
|
val convertedEntity = entity.toDomainEntity()
|
||||||
|
|
||||||
with(convertedEntity) {
|
with(convertedEntity) {
|
||||||
currentPlayingIndex `should equal` entity.currentIndex
|
currentPlayingIndex `should be equal to` entity.currentIndex
|
||||||
gain `should equal` entity.gain
|
gain `should be equal to` entity.gain
|
||||||
isPlaying `should be equal to` entity.playing
|
isPlaying `should be equal to` entity.playing
|
||||||
positionSeconds `should equal` entity.position
|
positionSeconds `should be equal to` entity.position
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
package org.moire.ultrasonic.domain
|
package org.moire.ultrasonic.domain
|
||||||
|
|
||||||
import org.amshove.kluent.`should equal`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.Lyrics
|
import org.moire.ultrasonic.api.subsonic.models.Lyrics
|
||||||
|
|
||||||
@ -17,9 +17,9 @@ class APILyricsConverterTest {
|
|||||||
val convertedEntity = entity.toDomainEntity()
|
val convertedEntity = entity.toDomainEntity()
|
||||||
|
|
||||||
with(convertedEntity) {
|
with(convertedEntity) {
|
||||||
artist `should equal` entity.artist
|
artist `should be equal to` entity.artist
|
||||||
title `should equal` entity.title
|
title `should be equal to` entity.title
|
||||||
text `should equal` entity.text
|
text `should be equal to` entity.text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,6 @@ package org.moire.ultrasonic.domain
|
|||||||
|
|
||||||
import java.util.Calendar
|
import java.util.Calendar
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.MusicDirectory
|
import org.moire.ultrasonic.api.subsonic.models.MusicDirectory
|
||||||
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
||||||
@ -24,9 +23,9 @@ class APIMusicDirectoryConverterTest {
|
|||||||
val convertedEntity = entity.toDomainEntity()
|
val convertedEntity = entity.toDomainEntity()
|
||||||
|
|
||||||
with(convertedEntity) {
|
with(convertedEntity) {
|
||||||
name `should equal` entity.name
|
name `should be equal to` entity.name
|
||||||
getAllChild().size `should be equal to` entity.childList.size
|
getAllChild().size `should be equal to` entity.childList.size
|
||||||
getAllChild() `should equal` entity.childList
|
getAllChild() `should be equal to` entity.childList
|
||||||
.map { it.toDomainEntity() }.toMutableList()
|
.map { it.toDomainEntity() }.toMutableList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -48,33 +47,33 @@ class APIMusicDirectoryConverterTest {
|
|||||||
val convertedEntity = entity.toDomainEntity()
|
val convertedEntity = entity.toDomainEntity()
|
||||||
|
|
||||||
with(convertedEntity) {
|
with(convertedEntity) {
|
||||||
id `should equal` entity.id
|
id `should be equal to` entity.id
|
||||||
parent `should equal` entity.parent
|
parent `should be equal to` entity.parent
|
||||||
isDirectory `should be equal to` entity.isDir
|
isDirectory `should be equal to` entity.isDir
|
||||||
title `should equal` entity.title
|
title `should be equal to` entity.title
|
||||||
album `should equal` entity.album
|
album `should be equal to` entity.album
|
||||||
albumId `should equal` entity.albumId
|
albumId `should be equal to` entity.albumId
|
||||||
artist `should equal` entity.artist
|
artist `should be equal to` entity.artist
|
||||||
artistId `should equal` entity.artistId
|
artistId `should be equal to` entity.artistId
|
||||||
track `should equal` entity.track
|
track `should be equal to` entity.track
|
||||||
year `should equal` entity.year!!
|
year `should be equal to` entity.year!!
|
||||||
genre `should equal` entity.genre
|
genre `should be equal to` entity.genre
|
||||||
contentType `should equal` entity.contentType
|
contentType `should be equal to` entity.contentType
|
||||||
suffix `should equal` entity.suffix
|
suffix `should be equal to` entity.suffix
|
||||||
transcodedContentType `should equal` entity.transcodedContentType
|
transcodedContentType `should be equal to` entity.transcodedContentType
|
||||||
transcodedSuffix `should equal` entity.transcodedSuffix
|
transcodedSuffix `should be equal to` entity.transcodedSuffix
|
||||||
coverArt `should equal` entity.coverArt
|
coverArt `should be equal to` entity.coverArt
|
||||||
size `should equal` entity.size
|
size `should be equal to` entity.size
|
||||||
duration `should equal` entity.duration
|
duration `should be equal to` entity.duration
|
||||||
bitRate `should equal` entity.bitRate
|
bitRate `should be equal to` entity.bitRate
|
||||||
path `should equal` entity.path
|
path `should be equal to` entity.path
|
||||||
isVideo `should be equal to` entity.isVideo
|
isVideo `should be equal to` entity.isVideo
|
||||||
created `should equal` entity.created?.time
|
created `should be equal to` entity.created?.time
|
||||||
starred `should be equal to` (entity.starred != null)
|
starred `should be equal to` (entity.starred != null)
|
||||||
discNumber `should equal` entity.discNumber
|
discNumber `should be equal to` entity.discNumber
|
||||||
type `should equal` entity.type
|
type `should be equal to` entity.type
|
||||||
userRating `should equal` entity.userRating
|
userRating `should be equal to` entity.userRating
|
||||||
averageRating `should equal` entity.averageRating
|
averageRating `should be equal to` entity.averageRating
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,8 +87,8 @@ class APIMusicDirectoryConverterTest {
|
|||||||
val convertedEntity = entity.toDomainEntity()
|
val convertedEntity = entity.toDomainEntity()
|
||||||
|
|
||||||
with(convertedEntity) {
|
with(convertedEntity) {
|
||||||
id `should equal` entity.streamId
|
id `should be equal to` entity.streamId
|
||||||
artist `should equal` dateFormat.format(entity.publishDate?.time)
|
artist `should be equal to` dateFormat.format(entity.publishDate!!.time)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,7 +100,7 @@ class APIMusicDirectoryConverterTest {
|
|||||||
|
|
||||||
domainList.size `should be equal to` entitiesList.size
|
domainList.size `should be equal to` entitiesList.size
|
||||||
domainList.forEachIndexed { index, entry ->
|
domainList.forEachIndexed { index, entry ->
|
||||||
entry `should equal` entitiesList[index].toDomainEntity()
|
entry `should be equal to` entitiesList[index].toDomainEntity()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,6 @@ package org.moire.ultrasonic.domain
|
|||||||
|
|
||||||
import java.util.Calendar
|
import java.util.Calendar
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
||||||
import org.moire.ultrasonic.api.subsonic.models.Playlist
|
import org.moire.ultrasonic.api.subsonic.models.Playlist
|
||||||
@ -26,10 +25,10 @@ class APIPlaylistConverterTest {
|
|||||||
val convertedEntity = entity.toMusicDirectoryDomainEntity()
|
val convertedEntity = entity.toMusicDirectoryDomainEntity()
|
||||||
|
|
||||||
with(convertedEntity) {
|
with(convertedEntity) {
|
||||||
name `should equal` entity.name
|
name `should be equal to` entity.name
|
||||||
getAllChild().size `should be equal to` entity.entriesList.size
|
getAllChild().size `should be equal to` entity.entriesList.size
|
||||||
getAllChild()[0] `should equal` entity.entriesList[0].toDomainEntity()
|
getAllChild()[0] `should be equal to` entity.entriesList[0].toDomainEntity()
|
||||||
getAllChild()[1] `should equal` entity.entriesList[1].toDomainEntity()
|
getAllChild()[1] `should be equal to` entity.entriesList[1].toDomainEntity()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,9 +48,9 @@ class APIPlaylistConverterTest {
|
|||||||
name `should be equal to` entity.name
|
name `should be equal to` entity.name
|
||||||
comment `should be equal to` entity.comment
|
comment `should be equal to` entity.comment
|
||||||
owner `should be equal to` entity.owner
|
owner `should be equal to` entity.owner
|
||||||
public `should equal` entity.public
|
public `should be equal to` entity.public
|
||||||
songCount `should be equal to` entity.songCount.toString()
|
songCount `should be equal to` entity.songCount.toString()
|
||||||
created `should be equal to` playlistDateFormat.format(entity.created?.time)
|
created `should be equal to` playlistDateFormat.format(entity.created!!.time)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,7 +62,7 @@ class APIPlaylistConverterTest {
|
|||||||
|
|
||||||
with(convertedList) {
|
with(convertedList) {
|
||||||
size `should be equal to` entitiesList.size
|
size `should be equal to` entitiesList.size
|
||||||
this[0] `should equal` entitiesList[0].toDomainEntity()
|
this[0] `should be equal to` entitiesList[0].toDomainEntity()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
package org.moire.ultrasonic.domain
|
package org.moire.ultrasonic.domain
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.PodcastChannel
|
import org.moire.ultrasonic.api.subsonic.models.PodcastChannel
|
||||||
|
|
||||||
@ -22,11 +21,11 @@ class APIPodcastConverterTest {
|
|||||||
val converterEntity = entity.toDomainEntity()
|
val converterEntity = entity.toDomainEntity()
|
||||||
|
|
||||||
with(converterEntity) {
|
with(converterEntity) {
|
||||||
id `should equal` entity.id
|
id `should be equal to` entity.id
|
||||||
description `should equal` entity.description
|
description `should be equal to` entity.description
|
||||||
status `should equal` entity.status
|
status `should be equal to` entity.status
|
||||||
title `should equal` entity.title
|
title `should be equal to` entity.title
|
||||||
url `should equal` entity.url
|
url `should be equal to` entity.url
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,7 +40,7 @@ class APIPodcastConverterTest {
|
|||||||
|
|
||||||
with(converted) {
|
with(converted) {
|
||||||
size `should be equal to` entitiesList.size
|
size `should be equal to` entitiesList.size
|
||||||
this[0] `should equal` entitiesList[0].toDomainEntity()
|
this[0] `should be equal to` entitiesList[0].toDomainEntity()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,7 @@
|
|||||||
package org.moire.ultrasonic.domain
|
package org.moire.ultrasonic.domain
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
import org.amshove.kluent.`should not be equal to`
|
||||||
import org.amshove.kluent.`should not equal`
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.Album
|
import org.moire.ultrasonic.api.subsonic.models.Album
|
||||||
import org.moire.ultrasonic.api.subsonic.models.Artist
|
import org.moire.ultrasonic.api.subsonic.models.Artist
|
||||||
@ -30,12 +29,12 @@ class APISearchConverterTest {
|
|||||||
val convertedEntity = entity.toDomainEntity()
|
val convertedEntity = entity.toDomainEntity()
|
||||||
|
|
||||||
with(convertedEntity) {
|
with(convertedEntity) {
|
||||||
albums `should not equal` null
|
albums `should not be equal to` null
|
||||||
albums.size `should be equal to` 0
|
albums.size `should be equal to` 0
|
||||||
artists `should not equal` null
|
artists `should not be equal to` null
|
||||||
artists.size `should be equal to` 0
|
artists.size `should be equal to` 0
|
||||||
songs.size `should be equal to` entity.matchList.size
|
songs.size `should be equal to` entity.matchList.size
|
||||||
songs[0] `should equal` entity.matchList[0].toDomainEntity()
|
songs[0] `should be equal to` entity.matchList[0].toDomainEntity()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,11 +50,11 @@ class APISearchConverterTest {
|
|||||||
|
|
||||||
with(convertedEntity) {
|
with(convertedEntity) {
|
||||||
artists.size `should be equal to` entity.artistList.size
|
artists.size `should be equal to` entity.artistList.size
|
||||||
artists[0] `should equal` entity.artistList[0].toDomainEntity()
|
artists[0] `should be equal to` entity.artistList[0].toDomainEntity()
|
||||||
albums.size `should be equal to` entity.albumList.size
|
albums.size `should be equal to` entity.albumList.size
|
||||||
albums[0] `should equal` entity.albumList[0].toDomainEntity()
|
albums[0] `should be equal to` entity.albumList[0].toDomainEntity()
|
||||||
songs.size `should be equal to` entity.songList.size
|
songs.size `should be equal to` entity.songList.size
|
||||||
songs[0] `should equal` entity.songList[0].toDomainEntity()
|
songs[0] `should be equal to` entity.songList[0].toDomainEntity()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,11 +70,11 @@ class APISearchConverterTest {
|
|||||||
|
|
||||||
with(convertedEntity) {
|
with(convertedEntity) {
|
||||||
artists.size `should be equal to` entity.artistList.size
|
artists.size `should be equal to` entity.artistList.size
|
||||||
artists[0] `should equal` entity.artistList[0].toDomainEntity()
|
artists[0] `should be equal to` entity.artistList[0].toDomainEntity()
|
||||||
albums.size `should be equal to` entity.albumList.size
|
albums.size `should be equal to` entity.albumList.size
|
||||||
albums[0] `should equal` entity.albumList[0].toDomainEntity()
|
albums[0] `should be equal to` entity.albumList[0].toDomainEntity()
|
||||||
songs.size `should be equal to` entity.songList.size
|
songs.size `should be equal to` entity.songList.size
|
||||||
songs[0] `should equal` entity.songList[0].toDomainEntity()
|
songs[0] `should be equal to` entity.songList[0].toDomainEntity()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,6 @@ package org.moire.ultrasonic.domain
|
|||||||
|
|
||||||
import java.util.Calendar
|
import java.util.Calendar
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
|
||||||
import org.moire.ultrasonic.api.subsonic.models.Share
|
import org.moire.ultrasonic.api.subsonic.models.Share
|
||||||
@ -20,15 +19,15 @@ class APIShareConverterTest {
|
|||||||
val domainEntity = entity.toDomainEntity()
|
val domainEntity = entity.toDomainEntity()
|
||||||
|
|
||||||
with(domainEntity) {
|
with(domainEntity) {
|
||||||
id `should equal` entity.id
|
id `should be equal to` entity.id
|
||||||
url `should equal` entity.url
|
url `should be equal to` entity.url
|
||||||
description `should equal` entity.description
|
description `should be equal to` entity.description
|
||||||
username `should equal` entity.username
|
username `should be equal to` entity.username
|
||||||
created `should equal` shareTimeFormat.format(entity.created?.time)
|
created `should be equal to` shareTimeFormat.format(entity.created!!.time)
|
||||||
lastVisited `should equal` shareTimeFormat.format(entity.lastVisited?.time)
|
lastVisited `should be equal to` shareTimeFormat.format(entity.lastVisited!!.time)
|
||||||
expires `should equal` shareTimeFormat.format(entity.expires?.time)
|
expires `should be equal to` shareTimeFormat.format(entity.expires!!.time)
|
||||||
visitCount `should equal` entity.visitCount.toLong()
|
visitCount `should be equal to` entity.visitCount.toLong()
|
||||||
this.getEntries() `should equal` entity.items.toDomainEntityList()
|
this.getEntries() `should be equal to` entity.items.toDomainEntityList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,7 +50,7 @@ class APIShareConverterTest {
|
|||||||
val domainEntityList = entityList.toDomainEntitiesList()
|
val domainEntityList = entityList.toDomainEntitiesList()
|
||||||
|
|
||||||
domainEntityList.size `should be equal to` entityList.size
|
domainEntityList.size `should be equal to` entityList.size
|
||||||
domainEntityList[0] `should equal` entityList[0].toDomainEntity()
|
domainEntityList[0] `should be equal to` entityList[0].toDomainEntity()
|
||||||
domainEntityList[1] `should equal` entityList[1].toDomainEntity()
|
domainEntityList[1] `should be equal to` entityList[1].toDomainEntity()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
package org.moire.ultrasonic.domain
|
package org.moire.ultrasonic.domain
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.User
|
import org.moire.ultrasonic.api.subsonic.models.User
|
||||||
|
|
||||||
@ -25,7 +24,7 @@ class APIUserConverterTest {
|
|||||||
commentRole `should be equal to` entity.commentRole
|
commentRole `should be equal to` entity.commentRole
|
||||||
coverArtRole `should be equal to` entity.coverArtRole
|
coverArtRole `should be equal to` entity.coverArtRole
|
||||||
downloadRole `should be equal to` entity.downloadRole
|
downloadRole `should be equal to` entity.downloadRole
|
||||||
email `should equal` entity.email
|
email `should be equal to` entity.email
|
||||||
jukeboxRole `should be equal to` entity.jukeboxRole
|
jukeboxRole `should be equal to` entity.jukeboxRole
|
||||||
playlistRole `should be equal to` entity.playlistRole
|
playlistRole `should be equal to` entity.playlistRole
|
||||||
podcastRole `should be equal to` entity.podcastRole
|
podcastRole `should be equal to` entity.podcastRole
|
||||||
@ -34,7 +33,7 @@ class APIUserConverterTest {
|
|||||||
shareRole `should be equal to` entity.shareRole
|
shareRole `should be equal to` entity.shareRole
|
||||||
streamRole `should be equal to` entity.streamRole
|
streamRole `should be equal to` entity.streamRole
|
||||||
uploadRole `should be equal to` entity.uploadRole
|
uploadRole `should be equal to` entity.uploadRole
|
||||||
userName `should equal` entity.username
|
userName `should be equal to` entity.username
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
package org.moire.ultrasonic.domain
|
package org.moire.ultrasonic.domain
|
||||||
|
|
||||||
import org.amshove.kluent.`should be equal to`
|
import org.amshove.kluent.`should be equal to`
|
||||||
import org.amshove.kluent.`should equal`
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.moire.ultrasonic.api.subsonic.models.Genre
|
import org.moire.ultrasonic.api.subsonic.models.Genre
|
||||||
|
|
||||||
@ -18,8 +17,8 @@ class ApiGenreConverterTest {
|
|||||||
val domainEntity = entity.toDomainEntity()
|
val domainEntity = entity.toDomainEntity()
|
||||||
|
|
||||||
with(domainEntity) {
|
with(domainEntity) {
|
||||||
name `should equal` entity.name
|
name `should be equal to` entity.name
|
||||||
index `should equal` "s"
|
index `should be equal to` "s"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -33,7 +32,7 @@ class ApiGenreConverterTest {
|
|||||||
val domainEntitiesList = entitiesList.toDomainEntityList()
|
val domainEntitiesList = entitiesList.toDomainEntityList()
|
||||||
|
|
||||||
domainEntitiesList.size `should be equal to` entitiesList.size
|
domainEntitiesList.size `should be equal to` entitiesList.size
|
||||||
domainEntitiesList[0] `should equal` entitiesList[0].toDomainEntity()
|
domainEntitiesList[0] `should be equal to` entitiesList[0].toDomainEntity()
|
||||||
domainEntitiesList[1] `should equal` entitiesList[1].toDomainEntity()
|
domainEntitiesList[1] `should be equal to` entitiesList[1].toDomainEntity()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user