File tree Expand file tree Collapse file tree 6 files changed +8
-28
lines changed
src/test/kotlin/com/contentful/java/cda Expand file tree Collapse file tree 6 files changed +8
-28
lines changed Original file line number Diff line number Diff line change 272272 </build >
273273
274274 <repositories >
275- <repository >
276- <id >jetbrains-all</id >
277- <url >http://repository.jetbrains.com/all</url >
278- </repository >
279275 <repository >
280276 <id >sonatype.oss.snapshots</id >
281277 <name >Sonatype OSS Snapshot Repository</name >
288284 </snapshots >
289285 </repository >
290286 </repositories >
291-
292- <pluginRepositories >
293- <pluginRepository >
294- <id >sonatype.oss.snapshots</id >
295- <name >Sonatype OSS Snapshot Repository</name >
296- <url >http://oss.sonatype.org/content/repositories/snapshots</url >
297- <releases >
298- <enabled >false</enabled >
299- </releases >
300- <snapshots >
301- <enabled >true</enabled >
302- </snapshots >
303- </pluginRepository >
304- </pluginRepositories >
305287</project >
Original file line number Diff line number Diff line change 1616
1717package com.contentful.java.cda
1818
19- import kotlin.test.assertEquals
20- import kotlin.test.assertTrue
2119import com.contentful.java.cda.model.CDAAsset
2220import com.contentful.java.cda.lib.TestCallback
21+ import kotlin.test.assertEquals
22+ import kotlin.test.assertTrue
2323import org.junit.Test as test
2424
2525/* *
Original file line number Diff line number Diff line change 1717package com.contentful.java.cda
1818
1919import com.contentful.java.cda.lib.TestCallback
20- import kotlin.test.assertEquals
21- import kotlin.test.assertTrue
2220import org.junit.Test as test
2321import com.contentful.java.cda.model.CDAEntry
2422import com.contentful.java.cda.model.CDAAsset
2523import com.contentful.java.cda.model.CDAArray
2624import kotlin.test.assertNotNull
2725import retrofit.RestAdapter
26+ import kotlin.test.assertEquals
2827import kotlin.test.assertNull
28+ import kotlin.test.assertTrue
2929
3030/* *
3131 * Entry Tests.
@@ -141,7 +141,7 @@ class EntryTests : BaseTest() {
141141 assertEquals(" /spaces/spaceid/entries/jake" , recordedRequest.getPath())
142142 }
143143
144- class object {
144+ companion object {
145145 fun verifyFetchAll (result : CDAArray , client : CDAClient ) {
146146 assertEquals(2 , result.getTotal())
147147 assertEquals(0 , result.getSkip())
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ class SerializationTests : BaseTest() {
8282
8383 class BadClass1 (val whatever : String ) : CDAResource()
8484 class BadClass2 () : CDAEntry() {
85- {
85+ init {
8686 throw IllegalAccessException ()
8787 }
8888 }
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class TestCallback<T>(val allowEmpty: Boolean = false) : CDACallback<T>() {
2828 var value: T = null
2929 var error: RetrofitError ? = null
3030
31- {
31+ init {
3232 cdl = CountDownLatch (1 )
3333 }
3434
Original file line number Diff line number Diff line change @@ -9,10 +9,8 @@ import org.apache.commons.io.IOUtils
99 * Utils.
1010 */
1111class TestUtils {
12- class object {
12+ companion object {
1313 fun fileToString (fileName : String ): String =
1414 FileUtils .readFileToString(File (" src/test/resources/${fileName} " ), " UTF-8" )
1515 }
1616}
17-
18- fun RecordedRequest.getBodyAsString () = IOUtils .toString(getBody(), " UTF-8" )
You can’t perform that action at this time.
0 commit comments