2017-03-02 06:37:51 +01:00
|
|
|
package org.moire.ultrasonic.api.subsonic
|
|
|
|
|
|
|
|
import org.junit.Before
|
|
|
|
import org.junit.Rule
|
|
|
|
import org.moire.ultrasonic.api.subsonic.rules.MockWebServerRule
|
|
|
|
|
|
|
|
/**
|
2017-08-16 21:37:58 +02:00
|
|
|
* Base class for integration tests for [SubsonicAPIClient] class.
|
2017-03-02 06:37:51 +01:00
|
|
|
*/
|
2017-08-16 21:37:58 +02:00
|
|
|
abstract class SubsonicAPIClientTest {
|
2017-07-17 22:24:47 +02:00
|
|
|
@JvmField @Rule val mockWebServerRule = MockWebServerRule()
|
2017-03-02 06:37:51 +01:00
|
|
|
|
2018-06-23 22:30:11 +02:00
|
|
|
protected lateinit var config: SubsonicClientConfiguration
|
2017-08-16 21:37:58 +02:00
|
|
|
protected lateinit var client: SubsonicAPIClient
|
2017-03-02 06:37:51 +01:00
|
|
|
|
|
|
|
@Before
|
2020-08-27 10:27:25 +02:00
|
|
|
open fun setUp() {
|
2018-06-23 22:30:11 +02:00
|
|
|
config = SubsonicClientConfiguration(
|
|
|
|
mockWebServerRule.mockWebServer.url("/").toString(),
|
|
|
|
USERNAME,
|
|
|
|
PASSWORD,
|
|
|
|
CLIENT_VERSION,
|
|
|
|
CLIENT_ID
|
|
|
|
)
|
|
|
|
client = SubsonicAPIClient(config)
|
2017-03-02 06:37:51 +01:00
|
|
|
}
|
2017-07-30 22:23:20 +02:00
|
|
|
}
|