mirror of
https://github.com/ultrasonic/ultrasonic
synced 2025-02-28 17:37:39 +01:00
Update Kluent to 1.35 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
This commit is contained in:
parent
385779933b
commit
55a0e7cb3c
@ -1,7 +1,7 @@
|
||||
package org.moire.ultrasonic.cache
|
||||
|
||||
import org.amshove.kluent.`should be equal to`
|
||||
import org.amshove.kluent.`should contain`
|
||||
import org.amshove.kluent.`should equal to`
|
||||
import org.amshove.kluent.`should equal`
|
||||
import org.junit.Test
|
||||
import org.moire.ultrasonic.cache.serializers.getMusicFolderSerializer
|
||||
@ -20,8 +20,8 @@ class PermanentFileStorageTest : BaseStorageTest() {
|
||||
val item = MusicFolder("1", "2")
|
||||
storage.store("test", item, getMusicFolderSerializer())
|
||||
|
||||
storageDir.exists() `should equal to` true
|
||||
getServerStorageDir().exists() `should equal to` true
|
||||
storageDir.exists() `should be equal to` true
|
||||
getServerStorageDir().exists() `should be equal to` true
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -32,7 +32,7 @@ class PermanentFileStorageTest : BaseStorageTest() {
|
||||
storage.store(name, item, getMusicFolderSerializer())
|
||||
|
||||
val storageFiles = getServerStorageDir().listFiles()
|
||||
storageFiles.size `should equal to` 1
|
||||
storageFiles.size `should be equal to` 1
|
||||
storageFiles[0].name `should contain` name
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ class PermanentFileStorageTest : BaseStorageTest() {
|
||||
|
||||
storage.clearAll()
|
||||
|
||||
getServerStorageDir().listFiles().size `should equal to` 0
|
||||
getServerStorageDir().listFiles().size `should be equal to` 0
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -27,7 +27,7 @@ ext.versions = [
|
||||
junit : "4.12",
|
||||
mockito : "2.16.0",
|
||||
mockitoKotlin : "1.5.0",
|
||||
kluent : "1.26",
|
||||
kluent : "1.35",
|
||||
apacheCodecs : "1.10",
|
||||
]
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package org.moire.ultrasonic.api.subsonic
|
||||
|
||||
import okhttp3.mockwebserver.MockResponse
|
||||
import org.amshove.kluent.`should equal to`
|
||||
import org.amshove.kluent.`should be equal to`
|
||||
import org.junit.Before
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
@ -34,7 +34,7 @@ class GetStreamUrlTest {
|
||||
|
||||
val streamUrl = client.getStreamUrl(id)
|
||||
|
||||
streamUrl `should equal to` expectedUrl
|
||||
streamUrl `should be equal to` expectedUrl
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -43,6 +43,6 @@ class GetStreamUrlTest {
|
||||
|
||||
val streamUrl = client.getStreamUrl(id)
|
||||
|
||||
streamUrl `should equal to` expectedUrl
|
||||
streamUrl `should be equal to` expectedUrl
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.moire.ultrasonic.api.subsonic
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
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
|
||||
@ -26,19 +26,20 @@ class SubsonicApiCreateShareTest : SubsonicAPIClientTest() {
|
||||
val response = client.api.createShare(listOf("some-id")).execute()
|
||||
|
||||
assertResponseSuccessful(response)
|
||||
response.body()!!.shares.size `should equal to` 1
|
||||
response.body()!!.shares.size `should be equal to` 1
|
||||
with(response.body()!!.shares[0]) {
|
||||
id `should equal to` "0"
|
||||
url `should equal to` "https://subsonic.com/ext/share/awdwo?jwt=eyJhbGciOiJIUzI1NiJ9." +
|
||||
id `should be equal to` "0"
|
||||
url `should be equal to` "https://subsonic.com/ext/share/awdwo?jwt=" +
|
||||
"eyJhbGciOiJIUzI1NiJ9." +
|
||||
"eyJwYXRoIjoiL2V4dC9zaGFyZS9hd2R3byIsImV4cCI6MTU0MTYyNjQzMX0.iy8dkt_ZZc8hJ692" +
|
||||
"UxorHdHWFU2RB-fMCmCA4IJ_dTw"
|
||||
username `should equal to` "admin"
|
||||
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")
|
||||
description `should equal to` "Awesome link!"
|
||||
visitCount `should equal to` 0
|
||||
items.size `should equal to` 1
|
||||
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(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,6 +1,6 @@
|
||||
package org.moire.ultrasonic.api.subsonic
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
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
|
||||
@ -29,7 +29,7 @@ class SubsonicApiGetAlbumList2Test : SubsonicAPIClientTest() {
|
||||
|
||||
assertResponseSuccessful(response)
|
||||
with(response.body()!!.albumList) {
|
||||
this.size `should equal to` 2
|
||||
this.size `should be equal to` 2
|
||||
this[0] `should equal` 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,
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.moire.ultrasonic.api.subsonic
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
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
|
||||
@ -28,7 +28,7 @@ class SubsonicApiGetAlbumListRequestTest : SubsonicAPIClientTest() {
|
||||
|
||||
assertResponseSuccessful(response)
|
||||
with(response.body()!!.albumList) {
|
||||
size `should equal to` 2
|
||||
size `should be equal to` 2
|
||||
this[1] `should equal` 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,6 +1,6 @@
|
||||
package org.moire.ultrasonic.api.subsonic
|
||||
|
||||
import org.amshove.kluent.`should 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.junit.Test
|
||||
@ -39,17 +39,17 @@ class SubsonicApiGetAlbumTest : SubsonicAPIClientTest() {
|
||||
|
||||
assertResponseSuccessful(response)
|
||||
with(response.body()!!.album) {
|
||||
id `should equal to` "618"
|
||||
name `should equal to` "Black Ice"
|
||||
artist `should equal to` "AC/DC"
|
||||
artistId `should equal to` "362"
|
||||
coverArt `should equal to` "al-618"
|
||||
songCount `should equal to` 15
|
||||
duration `should equal to` 3331
|
||||
id `should be equal to` "618"
|
||||
name `should be equal to` "Black Ice"
|
||||
artist `should be equal to` "AC/DC"
|
||||
artistId `should be equal to` "362"
|
||||
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")
|
||||
year `should equal to` 2008
|
||||
genre `should equal to` "Hard Rock"
|
||||
songList.size `should equal to` 15
|
||||
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(id = "6491", parent = "6475",
|
||||
isDir = false, title = "Rock 'n' Roll Train", album = "Black Ice",
|
||||
artist = "AC/DC", track = 1, year = 2008, genre = "Hard Rock",
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.moire.ultrasonic.api.subsonic
|
||||
|
||||
import org.amshove.kluent.`should 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.junit.Test
|
||||
@ -39,11 +39,11 @@ class SubsonicApiGetArtistTest : SubsonicAPIClientTest() {
|
||||
|
||||
assertResponseSuccessful(response)
|
||||
with(response.body()!!.artist) {
|
||||
id `should equal to` "362"
|
||||
name `should equal to` "AC/DC"
|
||||
coverArt `should equal to` "ar-362"
|
||||
albumCount `should equal to` 2
|
||||
albumsList.size `should equal to` 2
|
||||
id `should be equal to` "362"
|
||||
name `should be equal to` "AC/DC"
|
||||
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(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"),
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.moire.ultrasonic.api.subsonic
|
||||
|
||||
import org.amshove.kluent.`should 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.junit.Test
|
||||
@ -30,10 +30,10 @@ class SubsonicApiGetArtistsTest : SubsonicAPIClientTest() {
|
||||
|
||||
assertResponseSuccessful(response)
|
||||
with(response.body()!!.indexes) {
|
||||
lastModified `should equal to` 0L
|
||||
ignoredArticles `should equal to` "The El La Los Las Le Les"
|
||||
lastModified `should be equal to` 0L
|
||||
ignoredArticles `should be equal to` "The El La Los Las Le Les"
|
||||
shortcutList `should equal` emptyList()
|
||||
indexList.size `should equal to` 2
|
||||
indexList.size `should be equal to` 2
|
||||
indexList `should equal` listOf(
|
||||
Index(name = "A", artists = listOf(
|
||||
Artist(id = "362", name = "AC/DC", coverArt = "ar-362", albumCount = 2),
|
||||
|
@ -1,8 +1,8 @@
|
||||
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 to`
|
||||
import org.amshove.kluent.`should equal`
|
||||
import org.amshove.kluent.`should not be`
|
||||
import org.junit.Test
|
||||
@ -19,7 +19,7 @@ class SubsonicApiGetAvatarTest : SubsonicAPIClientTest() {
|
||||
|
||||
with(response) {
|
||||
stream `should be` null
|
||||
responseHttpCode `should equal to` 200
|
||||
responseHttpCode `should be equal to` 200
|
||||
apiError `should equal` SubsonicError.RequestedDataWasNotFound
|
||||
}
|
||||
}
|
||||
@ -33,7 +33,7 @@ class SubsonicApiGetAvatarTest : SubsonicAPIClientTest() {
|
||||
|
||||
with(response) {
|
||||
stream `should equal` null
|
||||
responseHttpCode `should equal to` httpErrorCode
|
||||
responseHttpCode `should be equal to` httpErrorCode
|
||||
apiError `should be` null
|
||||
}
|
||||
}
|
||||
@ -46,11 +46,11 @@ class SubsonicApiGetAvatarTest : SubsonicAPIClientTest() {
|
||||
val response = client.stream("some")
|
||||
|
||||
with(response) {
|
||||
responseHttpCode `should equal to` 200
|
||||
responseHttpCode `should be equal to` 200
|
||||
apiError `should be` null
|
||||
stream `should not be` null
|
||||
val expectedContent = mockWebServerRule.loadJsonResponse("ping_ok.json")
|
||||
stream!!.bufferedReader().readText() `should equal to` expectedContent
|
||||
stream!!.bufferedReader().readText() `should be equal to` expectedContent
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.moire.ultrasonic.api.subsonic
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
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
|
||||
@ -25,11 +25,11 @@ class SubsonicApiGetBookmarksTest : SubsonicAPIClientTest() {
|
||||
val response = client.api.getBookmarks().execute()
|
||||
|
||||
assertResponseSuccessful(response)
|
||||
response.body()!!.bookmarkList.size `should equal to` 1
|
||||
response.body()!!.bookmarkList.size `should be equal to` 1
|
||||
with(response.body()!!.bookmarkList[0]) {
|
||||
position `should equal to` 107914
|
||||
username `should equal to` "CaptainEurope"
|
||||
comment `should equal to` "Look at this"
|
||||
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(id = "10349", parent = "10342",
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.moire.ultrasonic.api.subsonic
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
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
|
||||
@ -26,7 +26,7 @@ class SubsonicApiGetChatMessagesTest : SubsonicAPIClientTest() {
|
||||
|
||||
assertResponseSuccessful(response)
|
||||
with(response.body()!!.chatMessages) {
|
||||
size `should equal to` 2
|
||||
size `should be equal to` 2
|
||||
this[0] `should equal` ChatMessage(username = "sindre", time = 1269771845310,
|
||||
message = "Sindre was here")
|
||||
this[1] `should equal` ChatMessage(username = "ben", time = 1269771842504,
|
||||
|
@ -1,8 +1,8 @@
|
||||
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 to`
|
||||
import org.amshove.kluent.`should equal`
|
||||
import org.amshove.kluent.`should not be`
|
||||
import org.junit.Test
|
||||
@ -19,7 +19,7 @@ class SubsonicApiGetCoverArtTest : SubsonicAPIClientTest() {
|
||||
|
||||
with(response) {
|
||||
stream `should be` null
|
||||
responseHttpCode `should equal to` 200
|
||||
responseHttpCode `should be equal to` 200
|
||||
apiError `should equal` SubsonicError.RequestedDataWasNotFound
|
||||
}
|
||||
}
|
||||
@ -46,11 +46,11 @@ class SubsonicApiGetCoverArtTest : SubsonicAPIClientTest() {
|
||||
val response = client.getCoverArt("some-id")
|
||||
|
||||
with(response) {
|
||||
responseHttpCode `should equal to` 200
|
||||
responseHttpCode `should be equal to` 200
|
||||
apiError `should be` null
|
||||
stream `should not be` null
|
||||
val expectedContent = mockWebServerRule.loadJsonResponse("ping_ok.json")
|
||||
stream!!.bufferedReader().readText() `should equal to` expectedContent
|
||||
stream!!.bufferedReader().readText() `should be equal to` expectedContent
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.moire.ultrasonic.api.subsonic
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
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
|
||||
@ -26,7 +26,7 @@ class SubsonicApiGetGenresTest : SubsonicAPIClientTest() {
|
||||
|
||||
assertResponseSuccessful(response)
|
||||
with(response.body()!!.genresList) {
|
||||
size `should equal to` 5
|
||||
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")
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.moire.ultrasonic.api.subsonic
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
import org.amshove.kluent.`should be equal to`
|
||||
import org.junit.Test
|
||||
|
||||
/**
|
||||
@ -22,9 +22,9 @@ class SubsonicApiGetLyricsTest : SubsonicAPIClientTest() {
|
||||
|
||||
assertResponseSuccessful(response)
|
||||
with(response.body()!!.lyrics) {
|
||||
artist `should equal to` "Amorphis"
|
||||
title `should equal to` "Alone"
|
||||
text `should equal to` "Tear dimmed rememberance\nIn a womb of time\nBreath upon " +
|
||||
artist `should be equal to` "Amorphis"
|
||||
title `should be equal to` "Alone"
|
||||
text `should be equal to` "Tear dimmed rememberance\nIn a womb of time\nBreath upon " +
|
||||
"me\nPossessed by the"
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
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 to`
|
||||
import org.amshove.kluent.`should equal`
|
||||
import org.amshove.kluent.`should not be`
|
||||
import org.junit.Test
|
||||
@ -42,13 +42,13 @@ class SubsonicApiGetMusicDirectoryTest : SubsonicAPIClientTest() {
|
||||
|
||||
response.body()!!.musicDirectory `should not be` null
|
||||
with(response.body()!!.musicDirectory) {
|
||||
id `should equal to` "4836"
|
||||
parent `should equal to` "300"
|
||||
id `should be equal to` "4836"
|
||||
parent `should be equal to` "300"
|
||||
name `should equal` "12 Stones"
|
||||
userRating `should equal to` 5
|
||||
averageRating `should equal to` 5.0f
|
||||
userRating `should be equal to` 5
|
||||
averageRating `should be equal to` 5.0f
|
||||
starred `should equal` null
|
||||
playCount `should equal to` 1
|
||||
playCount `should be equal to` 1
|
||||
childList.size `should be` 2
|
||||
childList[0] `should equal` MusicDirectoryChild(id = "4844", parent = "4836",
|
||||
isDir = false, title = "Crash", album = "12 Stones", artist = "12 Stones",
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.moire.ultrasonic.api.subsonic
|
||||
|
||||
import org.amshove.kluent.`should 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.junit.Test
|
||||
@ -29,16 +29,16 @@ class SubsonicApiGetPlaylistTest : SubsonicAPIClientTest() {
|
||||
|
||||
assertResponseSuccessful(response)
|
||||
with(response.body()!!.playlist) {
|
||||
id `should equal to` "0"
|
||||
name `should equal to` "Aug 27, 2017 11:17 AM"
|
||||
owner `should equal to` "admin"
|
||||
public `should equal to` false
|
||||
songCount `should equal to` 16
|
||||
duration `should equal to` 3573
|
||||
id `should be equal to` "0"
|
||||
name `should be equal to` "Aug 27, 2017 11:17 AM"
|
||||
owner `should be equal to` "admin"
|
||||
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")
|
||||
coverArt `should equal to` "pl-0"
|
||||
entriesList.size `should equal to` 2
|
||||
coverArt `should be equal to` "pl-0"
|
||||
entriesList.size `should be equal to` 2
|
||||
entriesList[1] `should equal` MusicDirectoryChild(id = "4215", parent = "4186",
|
||||
isDir = false, title = "Going to Hell", album = "Going to Hell",
|
||||
artist = "The Pretty Reckless", track = 2, year = 2014,
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.moire.ultrasonic.api.subsonic
|
||||
|
||||
import org.amshove.kluent.`should 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.junit.Test
|
||||
@ -28,7 +28,7 @@ class SubsonicApiGetPlaylistsTest : SubsonicAPIClientTest() {
|
||||
|
||||
assertResponseSuccessful(response)
|
||||
with(response.body()!!.playlists) {
|
||||
size `should equal to` 1
|
||||
size `should be equal to` 1
|
||||
this[0] `should equal` Playlist(id = "0", name = "Aug 27, 2017 11:17 AM",
|
||||
owner = "admin", public = false, songCount = 16, duration = 3573,
|
||||
comment = "Some comment",
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.moire.ultrasonic.api.subsonic
|
||||
|
||||
import org.amshove.kluent.`should 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.junit.Test
|
||||
@ -28,19 +28,19 @@ class SubsonicApiGetPodcastsTest : SubsonicAPIClientTest() {
|
||||
|
||||
assertResponseSuccessful(response)
|
||||
val podcastChannelsList = response.body()!!.podcastChannels
|
||||
podcastChannelsList.size `should equal to` 1
|
||||
podcastChannelsList.size `should be equal to` 1
|
||||
with(podcastChannelsList[0]) {
|
||||
id `should equal to` "2"
|
||||
url `should equal to` "http://feeds.codenewbie.org/cnpodcast.xml"
|
||||
title `should equal to` "CodeNewbie"
|
||||
description `should equal to` "Stories and interviews from people on their coding " +
|
||||
id `should be equal to` "2"
|
||||
url `should be equal to` "http://feeds.codenewbie.org/cnpodcast.xml"
|
||||
title `should be equal to` "CodeNewbie"
|
||||
description `should be equal to` "Stories and interviews from people on their coding " +
|
||||
"journey."
|
||||
coverArt `should equal to` "pod-2"
|
||||
originalImageUrl `should equal to` "http://codenewbie.blubrry.com/wp-content/uploads/" +
|
||||
"powerpress/220808.jpg"
|
||||
status `should equal to` "completed"
|
||||
errorMessage `should equal to` ""
|
||||
episodeList.size `should equal to` 10
|
||||
coverArt `should be equal to` "pod-2"
|
||||
originalImageUrl `should be equal to` "http://codenewbie.blubrry.com/wp-content/" +
|
||||
"uploads/powerpress/220808.jpg"
|
||||
status `should be equal to` "completed"
|
||||
errorMessage `should be equal to` ""
|
||||
episodeList.size `should be equal to` 10
|
||||
episodeList[0] `should equal` MusicDirectoryChild(id = "148", parent = "9959",
|
||||
isDir = false,
|
||||
title = "S1:EP3 – How to teach yourself computer science (Vaidehi Joshi)",
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.moire.ultrasonic.api.subsonic
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
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
|
||||
@ -26,7 +26,7 @@ class SubsonicApiGetRandomSongsTest : SubsonicAPIClientTest() {
|
||||
|
||||
assertResponseSuccessful(response)
|
||||
with(response.body()!!.songsList) {
|
||||
size `should equal to` 3
|
||||
size `should be equal to` 3
|
||||
this[1] `should equal` 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,6 +1,6 @@
|
||||
package org.moire.ultrasonic.api.subsonic
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
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
|
||||
@ -25,19 +25,19 @@ class SubsonicApiGetSharesTest : SubsonicAPIClientTest() {
|
||||
val response = client.api.getShares().execute()
|
||||
|
||||
assertResponseSuccessful(response)
|
||||
response.body()!!.shares.size `should equal to` 1
|
||||
response.body()!!.shares.size `should be equal to` 1
|
||||
with(response.body()!!.shares[0]) {
|
||||
id `should equal to` "0"
|
||||
url `should equal to` "https://subsonic.com/ext/share/awdwo?jwt=eyJhbGciOiJIUzI1" +
|
||||
id `should be equal to` "0"
|
||||
url `should be equal to` "https://subsonic.com/ext/share/awdwo?jwt=eyJhbGciOiJIUzI1" +
|
||||
"NiJ9.eyJwYXRoIjoiL2V4dC9zaGFyZS9hd2R3byIsImV4cCI6MTU0MTYyNjQzMX0.iy8dkt_ZZc8" +
|
||||
"hJ692UxorHdHWFU2RB-fMCmCA4IJ_dTw"
|
||||
username `should equal to` "admin"
|
||||
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")
|
||||
visitCount `should equal to` 0
|
||||
description `should equal to` "Awesome link!"
|
||||
items.size `should equal to` 1
|
||||
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(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,6 +1,6 @@
|
||||
package org.moire.ultrasonic.api.subsonic
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
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
|
||||
@ -25,7 +25,7 @@ class SubsonicApiGetSongsByGenreTest : SubsonicAPIClientTest() {
|
||||
val response = client.api.getSongsByGenre("Trance").execute()
|
||||
|
||||
assertResponseSuccessful(response)
|
||||
response.body()!!.songsList.size `should equal to` 2
|
||||
response.body()!!.songsList.size `should be equal to` 2
|
||||
with(response.body()!!.songsList) {
|
||||
this[0] `should equal` MusicDirectoryChild(id = "575", parent = "576", isDir = false,
|
||||
title = "Time Machine (Vadim Zhukov Remix)", album = "668",
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.moire.ultrasonic.api.subsonic
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
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
|
||||
@ -29,7 +29,7 @@ class SubsonicApiGetStarred2Test : SubsonicAPIClientTest() {
|
||||
assertResponseSuccessful(response)
|
||||
with(response.body()!!.starred2) {
|
||||
albumList `should equal` emptyList()
|
||||
artistList.size `should equal to` 1
|
||||
artistList.size `should be equal to` 1
|
||||
artistList[0] `should equal` Artist(id = "364", name = "Parov Stelar",
|
||||
starred = parseDate("2017-08-12T18:32:58.768Z"))
|
||||
songList `should equal` emptyList()
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.moire.ultrasonic.api.subsonic
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
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
|
||||
@ -28,7 +28,7 @@ class SubsonicApiGetStarredTest : SubsonicAPIClientTest() {
|
||||
assertResponseSuccessful(response)
|
||||
with(response.body()!!.starred) {
|
||||
albumList `should equal` emptyList()
|
||||
artistList.size `should equal to` 1
|
||||
artistList.size `should be equal to` 1
|
||||
artistList[0] `should equal` Artist(id = "364", name = "Parov Stelar",
|
||||
starred = parseDate("2017-08-12T18:32:58.768Z"))
|
||||
songList `should equal` emptyList()
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.moire.ultrasonic.api.subsonic
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
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
|
||||
@ -26,23 +26,23 @@ class SubsonicApiGetUserTest : SubsonicAPIClientTest() {
|
||||
|
||||
assertResponseSuccessful(response)
|
||||
with(response.body()!!.user) {
|
||||
username `should equal to` "GodOfUniverse"
|
||||
email `should equal to` "some.mail@example.com"
|
||||
scrobblingEnabled `should equal to` false
|
||||
adminRole `should equal to` true
|
||||
settingsRole `should equal to` true
|
||||
downloadRole `should equal to` true
|
||||
uploadRole `should equal to` true
|
||||
playlistRole `should equal to` true
|
||||
coverArtRole `should equal to` true
|
||||
commentRole `should equal to` true
|
||||
podcastRole `should equal to` true
|
||||
streamRole `should equal to` true
|
||||
jukeboxRole `should equal to` true
|
||||
shareRole `should equal to` true
|
||||
videoConverstionRole `should equal to` false
|
||||
folderList.size `should equal to` 1
|
||||
folderList[0] `should equal to` 0
|
||||
username `should be equal to` "GodOfUniverse"
|
||||
email `should be equal to` "some.mail@example.com"
|
||||
scrobblingEnabled `should be equal to` false
|
||||
adminRole `should be equal to` true
|
||||
settingsRole `should be equal to` true
|
||||
downloadRole `should be equal to` true
|
||||
uploadRole `should be equal to` true
|
||||
playlistRole `should be equal to` true
|
||||
coverArtRole `should be equal to` true
|
||||
commentRole `should be equal to` true
|
||||
podcastRole `should be equal to` true
|
||||
streamRole `should be equal to` true
|
||||
jukeboxRole `should be equal to` true
|
||||
shareRole `should be equal to` true
|
||||
videoConverstionRole `should be equal to` false
|
||||
folderList.size `should be equal to` 1
|
||||
folderList[0] `should be equal to` 0
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.moire.ultrasonic.api.subsonic
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
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
|
||||
@ -26,7 +26,7 @@ class SubsonicApiGetVideosListTest : SubsonicAPIClientTest() {
|
||||
|
||||
assertResponseSuccessful(response)
|
||||
with(response.body()!!.videosList) {
|
||||
size `should equal to` 1
|
||||
size `should be equal to` 1
|
||||
this[0] `should equal` MusicDirectoryChild(id = "10402", parent = "10401",
|
||||
isDir = false, title = "MVI_0512", album = "Incoming", size = 21889646,
|
||||
contentType = "video/avi", suffix = "avi",
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.moire.ultrasonic.api.subsonic
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
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
|
||||
@ -30,10 +30,10 @@ class SubsonicApiJukeboxControlTest : SubsonicAPIClientTest() {
|
||||
|
||||
assertResponseSuccessful(response)
|
||||
with(response.body()!!.jukebox) {
|
||||
currentIndex `should equal to` 94
|
||||
playing `should equal to` true
|
||||
gain `should equal to` 0.32f
|
||||
position `should equal to` 3
|
||||
currentIndex `should be equal to` 94
|
||||
playing `should be equal to` true
|
||||
gain `should be equal to` 0.32f
|
||||
position `should be equal to` 3
|
||||
playlistEntries `should equal` emptyList()
|
||||
}
|
||||
}
|
||||
@ -46,11 +46,11 @@ class SubsonicApiJukeboxControlTest : SubsonicAPIClientTest() {
|
||||
|
||||
assertResponseSuccessful(response)
|
||||
with(response.body()!!.jukebox) {
|
||||
currentIndex `should equal to` 887
|
||||
playing `should equal to` false
|
||||
gain `should equal to` 0.88f
|
||||
position `should equal to` 2
|
||||
playlistEntries.size `should equal to` 2
|
||||
currentIndex `should be equal to` 887
|
||||
playing `should be equal to` false
|
||||
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(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",
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.moire.ultrasonic.api.subsonic
|
||||
|
||||
import org.amshove.kluent.`should 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.junit.Test
|
||||
@ -30,9 +30,9 @@ class SubsonicApiSearchTest : SubsonicAPIClientTest() {
|
||||
|
||||
assertResponseSuccessful(response)
|
||||
with(response.body()!!.searchResult) {
|
||||
offset `should equal to` 10
|
||||
totalHits `should equal to` 53
|
||||
matchList.size `should equal to` 1
|
||||
offset `should be equal to` 10
|
||||
totalHits `should be equal to` 53
|
||||
matchList.size `should be equal to` 1
|
||||
matchList[0] `should equal` MusicDirectoryChild(id = "5831", parent = "5766",
|
||||
isDir = false, title = "You'll Be Under My Wheels",
|
||||
album = "Need for Speed Most Wanted", artist = "The Prodigy",
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.moire.ultrasonic.api.subsonic
|
||||
|
||||
import org.amshove.kluent.`should 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.junit.Test
|
||||
@ -31,16 +31,16 @@ class SubsonicApiSearchThreeTest : SubsonicAPIClientTest() {
|
||||
|
||||
assertResponseSuccessful(response)
|
||||
with(response.body()!!.searchResult) {
|
||||
artistList.size `should equal to` 1
|
||||
artistList.size `should be equal to` 1
|
||||
artistList[0] `should equal` Artist(id = "505", name = "The Prodigy",
|
||||
coverArt = "ar-505", albumCount = 5)
|
||||
albumList.size `should equal to` 1
|
||||
albumList.size `should be equal to` 1
|
||||
albumList[0] `should equal` Album(id = "855",
|
||||
name = "Always Outnumbered, Never Outgunned",
|
||||
artist = "The Prodigy", artistId = "505", coverArt = "al-855", songCount = 12,
|
||||
duration = 3313, created = parseDate("2016-10-23T20:57:27.000Z"),
|
||||
year = 2004, genre = "Electronic")
|
||||
songList.size `should equal to` 1
|
||||
songList.size `should be equal to` 1
|
||||
songList[0] `should equal` MusicDirectoryChild(id = "5831", parent = "5766",
|
||||
isDir = false,
|
||||
title = "You'll Be Under My Wheels", album = "Need for Speed Most Wanted",
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.moire.ultrasonic.api.subsonic
|
||||
|
||||
import org.amshove.kluent.`should 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.junit.Test
|
||||
@ -30,15 +30,15 @@ class SubsonicApiSearchTwoTest : SubsonicAPIClientTest() {
|
||||
|
||||
assertResponseSuccessful(response)
|
||||
with(response.body()!!.searchResult) {
|
||||
artistList.size `should equal to` 1
|
||||
artistList.size `should be equal to` 1
|
||||
artistList[0] `should equal` Artist(id = "522", name = "The Prodigy")
|
||||
albumList.size `should equal to` 1
|
||||
albumList.size `should be equal to` 1
|
||||
albumList[0] `should equal` MusicDirectoryChild(id = "8867", parent = "522",
|
||||
isDir = true, title = "Always Outnumbered, Never Outgunned",
|
||||
album = "Always Outnumbered, Never Outgunned", artist = "The Prodigy",
|
||||
year = 2004, genre = "Electronic", coverArt = "8867", playCount = 0,
|
||||
created = parseDate("2016-10-23T20:57:27.000Z"))
|
||||
songList.size `should equal to` 1
|
||||
songList.size `should be equal to` 1
|
||||
songList[0] `should equal` MusicDirectoryChild(id = "5831", parent = "5766",
|
||||
isDir = false,
|
||||
title = "You'll Be Under My Wheels", album = "Need for Speed Most Wanted",
|
||||
|
@ -1,8 +1,8 @@
|
||||
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 to`
|
||||
import org.amshove.kluent.`should equal`
|
||||
import org.amshove.kluent.`should not be`
|
||||
import org.junit.Test
|
||||
@ -19,7 +19,7 @@ class SubsonicApiStreamTest : SubsonicAPIClientTest() {
|
||||
|
||||
with(response) {
|
||||
stream `should be` null
|
||||
responseHttpCode `should equal to` 200
|
||||
responseHttpCode `should be equal to` 200
|
||||
apiError `should equal` SubsonicError.RequestedDataWasNotFound
|
||||
}
|
||||
}
|
||||
@ -33,7 +33,7 @@ class SubsonicApiStreamTest : SubsonicAPIClientTest() {
|
||||
|
||||
with(response) {
|
||||
stream `should be` null
|
||||
responseHttpCode `should equal to` httpErrorCode
|
||||
responseHttpCode `should be equal to` httpErrorCode
|
||||
apiError `should be` null
|
||||
}
|
||||
}
|
||||
@ -46,11 +46,11 @@ class SubsonicApiStreamTest : SubsonicAPIClientTest() {
|
||||
val response = client.stream("some-id")
|
||||
|
||||
with(response) {
|
||||
responseHttpCode `should equal to` 200
|
||||
responseHttpCode `should be equal to` 200
|
||||
apiError `should be` null
|
||||
stream `should not be` null
|
||||
val expectedContent = mockWebServerRule.loadJsonResponse("ping_ok.json")
|
||||
stream!!.bufferedReader().readText() `should equal to` expectedContent
|
||||
stream!!.bufferedReader().readText() `should be equal to` expectedContent
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,8 +2,8 @@ package org.moire.ultrasonic.api.subsonic.interceptors
|
||||
|
||||
import okhttp3.Interceptor
|
||||
import okhttp3.mockwebserver.MockResponse
|
||||
import org.amshove.kluent.`should be equal to`
|
||||
import org.amshove.kluent.`should contain`
|
||||
import org.amshove.kluent.`should equal to`
|
||||
import org.amshove.kluent.`should not contain`
|
||||
import org.junit.Test
|
||||
|
||||
@ -27,7 +27,7 @@ class RangeHeaderInterceptorTest : BaseInterceptorTest() {
|
||||
|
||||
val executedRequest = mockWebServerRule.mockWebServer.takeRequest()
|
||||
executedRequest.headers.names() `should contain` "Range"
|
||||
executedRequest.headers["Range"]!! `should equal to` "bytes=$offset-"
|
||||
executedRequest.headers["Range"]!! `should be equal to` "bytes=$offset-"
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -54,6 +54,6 @@ class RangeHeaderInterceptorTest : BaseInterceptorTest() {
|
||||
|
||||
val executedRequest = mockWebServerRule.mockWebServer.takeRequest()
|
||||
executedRequest.headers.names() `should contain` "Range"
|
||||
executedRequest.headers["Range"]!! `should equal to` "bytes=$offset-"
|
||||
executedRequest.headers["Range"]!! `should be equal to` "bytes=$offset-"
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.moire.ultrasonic.api.subsonic.models
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
import org.amshove.kluent.`should be equal to`
|
||||
import org.amshove.kluent.`should equal`
|
||||
import org.amshove.kluent.`should throw`
|
||||
import org.junit.Test
|
||||
@ -36,6 +36,6 @@ class AlbumListTypeTest {
|
||||
|
||||
@Test
|
||||
fun `Should return type name for toString call`() {
|
||||
AlbumListType.STARRED.typeName `should equal to` AlbumListType.STARRED.toString()
|
||||
AlbumListType.STARRED.typeName `should be equal to` AlbumListType.STARRED.toString()
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.moire.ultrasonic.api.subsonic.response
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
import org.amshove.kluent.`should be equal to`
|
||||
import org.junit.Test
|
||||
import org.moire.ultrasonic.api.subsonic.SubsonicError.RequestedDataWasNotFound
|
||||
|
||||
@ -11,26 +11,26 @@ class StreamResponseTest {
|
||||
@Test
|
||||
fun `Should have error if subsonic error is not null`() {
|
||||
StreamResponse(apiError = RequestedDataWasNotFound, responseHttpCode = 200)
|
||||
.hasError() `should equal to` true
|
||||
.hasError() `should be equal to` true
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `Should have error if http error is greater then 300`() {
|
||||
StreamResponse(responseHttpCode = 301).hasError() `should equal to` true
|
||||
StreamResponse(responseHttpCode = 301).hasError() `should be equal to` true
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `Should have error of http error code is lower then 200`() {
|
||||
StreamResponse(responseHttpCode = 199).hasError() `should equal to` true
|
||||
StreamResponse(responseHttpCode = 199).hasError() `should be equal to` true
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `Should not have error if http code is 200`() {
|
||||
StreamResponse(responseHttpCode = 200).hasError() `should equal to` false
|
||||
StreamResponse(responseHttpCode = 200).hasError() `should be equal to` false
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `Should not have error if http code is 300`() {
|
||||
StreamResponse(responseHttpCode = 300).hasError() `should equal to` false
|
||||
StreamResponse(responseHttpCode = 300).hasError() `should be equal to` false
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package org.moire.ultrasonic.domain
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
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
|
||||
@ -47,7 +47,7 @@ class APIAlbumConverterTest {
|
||||
|
||||
with(convertedEntity) {
|
||||
name `should equal` null
|
||||
getChildren().size `should equal to` entity.songList.size
|
||||
getChildren().size `should be equal to` entity.songList.size
|
||||
getChildren()[0] `should equal` entity.songList[0].toDomainEntity()
|
||||
}
|
||||
}
|
||||
@ -59,7 +59,7 @@ class APIAlbumConverterTest {
|
||||
val convertedList = entityList.toDomainEntityList()
|
||||
|
||||
with(convertedList) {
|
||||
size `should equal to` entityList.size
|
||||
size `should be equal to` entityList.size
|
||||
forEachIndexed { index, entry ->
|
||||
entry `should equal` entityList[index].toDomainEntity()
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package org.moire.ultrasonic.domain
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
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
|
||||
@ -21,7 +21,7 @@ class APIBookmarkConverterTest {
|
||||
val domainEntity = entity.toDomainEntity()
|
||||
|
||||
with(domainEntity) {
|
||||
position `should equal to` entity.position.toInt()
|
||||
position `should be equal to` entity.position.toInt()
|
||||
username `should equal` entity.username
|
||||
comment `should equal` entity.comment
|
||||
created `should equal` entity.created?.time
|
||||
@ -36,7 +36,7 @@ class APIBookmarkConverterTest {
|
||||
|
||||
val domainEntitiesList = entitiesList.toDomainEntitiesList()
|
||||
|
||||
domainEntitiesList.size `should equal to` entitiesList.size
|
||||
domainEntitiesList.size `should be equal to` entitiesList.size
|
||||
domainEntitiesList.forEachIndexed({ index, bookmark ->
|
||||
bookmark `should equal` entitiesList[index].toDomainEntity()
|
||||
})
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package org.moire.ultrasonic.domain
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
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
|
||||
@ -31,7 +31,7 @@ class APIChatMessageConverterTest {
|
||||
val domainEntitiesList = entitiesList.toDomainEntitiesList()
|
||||
|
||||
with(domainEntitiesList) {
|
||||
size `should equal to` entitiesList.size
|
||||
size `should be equal to` entitiesList.size
|
||||
forEachIndexed { index, chatMessage ->
|
||||
chatMessage `should equal` entitiesList[index].toDomainEntity()
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package org.moire.ultrasonic.domain
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
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
|
||||
@ -30,9 +30,9 @@ class APIIndexesConverterTest {
|
||||
|
||||
val expectedArtists = (artistsA + artistsT).map { it.toDomainEntity() }.toMutableList()
|
||||
with(convertedEntity) {
|
||||
lastModified `should equal to` entity.lastModified
|
||||
ignoredArticles `should equal to` entity.ignoredArticles
|
||||
artists.size `should equal to` expectedArtists.size
|
||||
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()
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package org.moire.ultrasonic.domain
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
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
|
||||
@ -20,7 +20,7 @@ class APIJukeboxConverterTest {
|
||||
with(convertedEntity) {
|
||||
currentPlayingIndex `should equal` entity.currentIndex
|
||||
gain `should equal` entity.gain
|
||||
isPlaying `should equal to` entity.playing
|
||||
isPlaying `should be equal to` entity.playing
|
||||
positionSeconds `should equal` entity.position
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package org.moire.ultrasonic.domain
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
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
|
||||
@ -23,7 +23,7 @@ class APIMusicDirectoryConverterTest {
|
||||
|
||||
with(convertedEntity) {
|
||||
name `should equal` entity.name
|
||||
getAllChild().size `should equal to` entity.childList.size
|
||||
getAllChild().size `should be equal to` entity.childList.size
|
||||
getAllChild() `should equal` entity.childList
|
||||
.map { it.toDomainEntity() }.toMutableList()
|
||||
}
|
||||
@ -46,7 +46,7 @@ class APIMusicDirectoryConverterTest {
|
||||
with(convertedEntity) {
|
||||
id `should equal` entity.id
|
||||
parent `should equal` entity.parent
|
||||
isDirectory `should equal to` entity.isDir
|
||||
isDirectory `should be equal to` entity.isDir
|
||||
title `should equal` entity.title
|
||||
album `should equal` entity.album
|
||||
albumId `should equal` entity.albumId
|
||||
@ -64,9 +64,9 @@ class APIMusicDirectoryConverterTest {
|
||||
duration `should equal` entity.duration
|
||||
bitRate `should equal` entity.bitRate
|
||||
path `should equal` entity.path
|
||||
isVideo `should equal to` entity.isVideo
|
||||
isVideo `should be equal to` entity.isVideo
|
||||
created `should equal` entity.created?.time
|
||||
starred `should equal to` (entity.starred != null)
|
||||
starred `should be equal to` (entity.starred != null)
|
||||
discNumber `should equal` entity.discNumber
|
||||
type `should equal` entity.type
|
||||
}
|
||||
@ -91,7 +91,7 @@ class APIMusicDirectoryConverterTest {
|
||||
|
||||
val domainList = entitiesList.toDomainEntityList()
|
||||
|
||||
domainList.size `should equal to` entitiesList.size
|
||||
domainList.size `should be equal to` entitiesList.size
|
||||
domainList.forEachIndexed { index, entry ->
|
||||
entry `should equal` entitiesList[index].toDomainEntity()
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package org.moire.ultrasonic.domain
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
import org.amshove.kluent.`should be equal to`
|
||||
import org.junit.Test
|
||||
import org.moire.ultrasonic.api.subsonic.models.MusicFolder
|
||||
|
||||
@ -16,8 +16,8 @@ class APIMusicFolderConverterTest {
|
||||
|
||||
val convertedEntity = entity.toDomainEntity()
|
||||
|
||||
convertedEntity.name `should equal to` entity.name
|
||||
convertedEntity.id `should equal to` entity.id
|
||||
convertedEntity.name `should be equal to` entity.name
|
||||
convertedEntity.id `should be equal to` entity.id
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -29,11 +29,11 @@ class APIMusicFolderConverterTest {
|
||||
val convertedList = entityList.toDomainEntityList()
|
||||
|
||||
with(convertedList) {
|
||||
size `should equal to` entityList.size
|
||||
this[0].id `should equal to` entityList[0].id
|
||||
this[0].name `should equal to` entityList[0].name
|
||||
this[1].id `should equal to` entityList[1].id
|
||||
this[1].name `should equal to` entityList[1].name
|
||||
size `should be equal to` entityList.size
|
||||
this[0].id `should be equal to` entityList[0].id
|
||||
this[0].name `should be equal to` entityList[0].name
|
||||
this[1].id `should be equal to` entityList[1].id
|
||||
this[1].name `should be equal to` entityList[1].name
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package org.moire.ultrasonic.domain
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
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
|
||||
@ -24,7 +24,7 @@ class APIPlaylistConverterTest {
|
||||
|
||||
with(convertedEntity) {
|
||||
name `should equal` entity.name
|
||||
getAllChild().size `should equal to` entity.entriesList.size
|
||||
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()
|
||||
}
|
||||
@ -40,13 +40,13 @@ class APIPlaylistConverterTest {
|
||||
val convertedEntity = entity.toDomainEntity()
|
||||
|
||||
with(convertedEntity) {
|
||||
id `should equal to` entity.id
|
||||
name `should equal to` entity.name
|
||||
comment `should equal to` entity.comment
|
||||
owner `should equal to` entity.owner
|
||||
id `should be equal to` entity.id
|
||||
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
|
||||
songCount `should equal to` entity.songCount.toString()
|
||||
created `should equal to` playlistDateFormat.format(entity.created?.time)
|
||||
songCount `should be equal to` entity.songCount.toString()
|
||||
created `should be equal to` playlistDateFormat.format(entity.created?.time)
|
||||
}
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ class APIPlaylistConverterTest {
|
||||
val convertedList = entitiesList.toDomainEntitiesList()
|
||||
|
||||
with(convertedList) {
|
||||
size `should equal to` entitiesList.size
|
||||
size `should be equal to` entitiesList.size
|
||||
this[0] `should equal` entitiesList[0].toDomainEntity()
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package org.moire.ultrasonic.domain
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
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
|
||||
@ -37,7 +37,7 @@ class APIPodcastConverterTest {
|
||||
val converted = entitiesList.toDomainEntitiesList()
|
||||
|
||||
with(converted) {
|
||||
size `should equal to` entitiesList.size
|
||||
size `should be equal to` entitiesList.size
|
||||
this[0] `should equal` entitiesList[0].toDomainEntity()
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package org.moire.ultrasonic.domain
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
import org.amshove.kluent.`should be equal to`
|
||||
import org.amshove.kluent.`should equal`
|
||||
import org.amshove.kluent.`should not equal`
|
||||
import org.junit.Test
|
||||
@ -27,10 +27,10 @@ class APISearchConverterTest {
|
||||
|
||||
with(convertedEntity) {
|
||||
albums `should not equal` null
|
||||
albums.size `should equal to` 0
|
||||
albums.size `should be equal to` 0
|
||||
artists `should not equal` null
|
||||
artists.size `should equal to` 0
|
||||
songs.size `should equal to` entity.matchList.size
|
||||
artists.size `should be equal to` 0
|
||||
songs.size `should be equal to` entity.matchList.size
|
||||
songs[0] `should equal` entity.matchList[0].toDomainEntity()
|
||||
}
|
||||
}
|
||||
@ -48,11 +48,11 @@ class APISearchConverterTest {
|
||||
val convertedEntity = entity.toDomainEntity()
|
||||
|
||||
with(convertedEntity) {
|
||||
artists.size `should equal to` entity.artistList.size
|
||||
artists.size `should be equal to` entity.artistList.size
|
||||
artists[0] `should equal` entity.artistList[0].toDomainEntity()
|
||||
albums.size `should equal to` entity.albumList.size
|
||||
albums.size `should be equal to` entity.albumList.size
|
||||
albums[0] `should equal` entity.albumList[0].toDomainEntity()
|
||||
songs.size `should equal to` entity.songList.size
|
||||
songs.size `should be equal to` entity.songList.size
|
||||
songs[0] `should equal` entity.songList[0].toDomainEntity()
|
||||
}
|
||||
}
|
||||
@ -68,11 +68,11 @@ class APISearchConverterTest {
|
||||
val convertedEntity = entity.toDomainEntity()
|
||||
|
||||
with(convertedEntity) {
|
||||
artists.size `should equal to` entity.artistList.size
|
||||
artists.size `should be equal to` entity.artistList.size
|
||||
artists[0] `should equal` entity.artistList[0].toDomainEntity()
|
||||
albums.size `should equal to` entity.albumList.size
|
||||
albums.size `should be equal to` entity.albumList.size
|
||||
albums[0] `should equal` entity.albumList[0].toDomainEntity()
|
||||
songs.size `should equal to` entity.songList.size
|
||||
songs.size `should be equal to` entity.songList.size
|
||||
songs[0] `should equal` entity.songList[0].toDomainEntity()
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package org.moire.ultrasonic.domain
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
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
|
||||
@ -47,7 +47,7 @@ class APIShareConverterTest {
|
||||
|
||||
val domainEntityList = entityList.toDomainEntitiesList()
|
||||
|
||||
domainEntityList.size `should equal to` entityList.size
|
||||
domainEntityList.size `should be equal to` entityList.size
|
||||
domainEntityList[0] `should equal` entityList[0].toDomainEntity()
|
||||
domainEntityList[1] `should equal` entityList[1].toDomainEntity()
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package org.moire.ultrasonic.domain
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
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
|
||||
@ -19,19 +19,19 @@ class APIUserConverterTest {
|
||||
val domainEntity = entity.toDomainEntity()
|
||||
|
||||
with(domainEntity) {
|
||||
adminRole `should equal to` entity.adminRole
|
||||
commentRole `should equal to` entity.commentRole
|
||||
coverArtRole `should equal to` entity.coverArtRole
|
||||
downloadRole `should equal to` entity.downloadRole
|
||||
adminRole `should be equal to` entity.adminRole
|
||||
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
|
||||
jukeboxRole `should equal to` entity.jukeboxRole
|
||||
playlistRole `should equal to` entity.playlistRole
|
||||
podcastRole `should equal to` entity.podcastRole
|
||||
scrobblingEnabled `should equal to` entity.scrobblingEnabled
|
||||
settingsRole `should equal to` entity.settingsRole
|
||||
shareRole `should equal to` entity.shareRole
|
||||
streamRole `should equal to` entity.streamRole
|
||||
uploadRole `should equal to` entity.uploadRole
|
||||
jukeboxRole `should be equal to` entity.jukeboxRole
|
||||
playlistRole `should be equal to` entity.playlistRole
|
||||
podcastRole `should be equal to` entity.podcastRole
|
||||
scrobblingEnabled `should be equal to` entity.scrobblingEnabled
|
||||
settingsRole `should be equal to` entity.settingsRole
|
||||
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
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package org.moire.ultrasonic.domain
|
||||
|
||||
import org.amshove.kluent.`should equal to`
|
||||
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
|
||||
@ -31,7 +31,7 @@ class ApiGenreConverterTest {
|
||||
|
||||
val domainEntitiesList = entitiesList.toDomainEntityList()
|
||||
|
||||
domainEntitiesList.size `should equal to` entitiesList.size
|
||||
domainEntitiesList.size `should be equal to` entitiesList.size
|
||||
domainEntitiesList[0] `should equal` entitiesList[0].toDomainEntity()
|
||||
domainEntitiesList[1] `should equal` entitiesList[1].toDomainEntity()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user