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