Skip to content

Commit 177883c

Browse files
Upgrades dependencies and adds support for Scala 2.13.0.
1 parent 794bdd2 commit 177883c

File tree

21 files changed

+146
-83
lines changed

21 files changed

+146
-83
lines changed

api/src/test/scala/global/namespace/fun/io/api/FilterSpec.scala

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2017 Schlichtherle IT Services
2+
* Copyright © 2017 - 2019 Schlichtherle IT Services
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,12 +17,12 @@ package global.namespace.fun.io.api
1717

1818
import java.io.{InputStream, OutputStream}
1919

20-
import Filter._
20+
import global.namespace.fun.io.api.Filter._
2121
import org.mockito.ArgumentMatchers.any
22-
import org.mockito.Mockito.{inOrder, when}
22+
import org.mockito.Mockito.when
2323
import org.scalatest.Matchers.{inOrder => _, _}
2424
import org.scalatest.WordSpec
25-
import org.scalatest.mockito.MockitoSugar.mock
25+
import org.scalatestplus.mockito.MockitoSugar.mock
2626

2727
/**
2828
* @author Christian Schlichtherle
@@ -59,20 +59,20 @@ class FilterSpec extends WordSpec {
5959
val oss1 = mock[Socket[OutputStream]]
6060
val oss2 = mock[Socket[OutputStream]]
6161

62-
when(s output ()) thenReturn oss1
62+
when(s.output()) thenReturn oss1
6363
when(f output oss1) thenReturn oss2
6464

65-
fs output () shouldBe oss2
65+
fs.output() shouldBe oss2
6666
}
6767

6868
"apply to the input" in {
6969
val iss1 = mock[Socket[InputStream]]
7070
val iss2 = mock[Socket[InputStream]]
7171

72-
when(s input ()) thenReturn iss1
72+
when(s.input()) thenReturn iss1
7373
when(f input iss1) thenReturn iss2
7474

75-
fs input () shouldBe iss2
75+
fs.input() shouldBe iss2
7676
}
7777
}
7878

api/src/test/scala/global/namespace/fun/io/api/InternalSpec.scala

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2017 Schlichtherle IT Services
2+
* Copyright © 2017 - 2019 Schlichtherle IT Services
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ import org.mockito.ArgumentMatchers._
2121
import org.mockito.Mockito._
2222
import org.scalatest.Matchers.{inOrder => _, _}
2323
import org.scalatest.WordSpec
24-
import org.scalatest.mockito.MockitoSugar.mock
24+
import org.scalatestplus.mockito.MockitoSugar.mock
2525

2626
class InternalSpec extends WordSpec {
2727

@@ -36,15 +36,15 @@ class InternalSpec extends WordSpec {
3636
val io = inOrder(a, b)
3737
io verify a output any[Socket[OutputStream]]
3838
io verify b output any[Socket[OutputStream]]
39-
io verifyNoMoreInteractions ()
39+
io.verifyNoMoreInteractions()
4040
}
4141

4242
"being unapplied" in {
4343
c input mock[Socket[InputStream]] shouldBe null
4444
val io = inOrder(a, b)
4545
io verify a input any[Socket[InputStream]]
4646
io verify b input any[Socket[InputStream]]
47-
io verifyNoMoreInteractions ()
47+
io.verifyNoMoreInteractions()
4848
}
4949
}
5050
}

aws-sdk1/src/test/scala/global/namespace/fun/io/aws/sdk1/AWSSpec.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2017 Schlichtherle IT Services
2+
* Copyright © 2017 - 2019 Schlichtherle IT Services
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -19,8 +19,8 @@ import com.amazonaws.services.s3.AmazonS3
1919
import global.namespace.fun.io.aws.sdk1.AWS.s3
2020
import org.scalatest.Matchers._
2121
import org.scalatest.WordSpec
22-
import org.scalatest.mockito.MockitoSugar._
23-
import org.scalatest.prop.PropertyChecks._
22+
import org.scalatestplus.mockito.MockitoSugar._
23+
import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks._
2424

2525
class AWSSpec extends WordSpec {
2626

aws-sdk2/src/test/scala/global/namespace/fun/io/aws/sdk2/AWSSpec.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2017 Schlichtherle IT Services
2+
* Copyright © 2017 - 2019 Schlichtherle IT Services
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -18,8 +18,8 @@ package global.namespace.fun.io.aws.sdk2
1818
import global.namespace.fun.io.aws.sdk2.AWS.s3
1919
import org.scalatest.Matchers._
2020
import org.scalatest.WordSpec
21-
import org.scalatest.mockito.MockitoSugar._
22-
import org.scalatest.prop.PropertyChecks._
21+
import org.scalatestplus.mockito.MockitoSugar._
22+
import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks._
2323
import software.amazon.awssdk.services.s3.S3Client
2424

2525
class AWSSpec extends WordSpec {

bios/src/test/scala/global/namespace/fun/io/bios/BIOSSpec.scala

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2017 Schlichtherle IT Services
2+
* Copyright © 2017 - 2019 Schlichtherle IT Services
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@ import global.namespace.fun.io.bios.BIOS._
2222
import org.mockito.Mockito._
2323
import org.scalatest.Matchers._
2424
import org.scalatest.WordSpec
25-
import org.scalatest.mockito.MockitoSugar.mock
25+
import org.scalatestplus.mockito.MockitoSugar.mock
2626

2727
class BIOSSpec extends WordSpec {
2828

@@ -32,17 +32,17 @@ class BIOSSpec extends WordSpec {
3232
val in = mock[InputStream]
3333
val source = stream(in)
3434
source acceptReader (_.read)
35-
verify(in) read ()
36-
verify(in, never) close ()
35+
verify(in).read()
36+
verify(in, never).close()
3737
}
3838

3939
"given an output stream" in {
4040
val out = mock[OutputStream]
4141
val sink = stream(out)
4242
sink acceptWriter ((_: OutputStream) write 0)
4343
verify(out) write 0
44-
verify(out) flush ()
45-
verify(out, never) close ()
44+
verify(out).flush()
45+
verify(out, never).close()
4646
}
4747
}
4848
}

bios/src/test/scala/global/namespace/fun/io/bios/DirectoryStoreSpec.scala

+15-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
11
/*
2-
* Copyright (C) 2013-2018 Schlichtherle IT Services.
3-
* All rights reserved. Use is subject to license terms.
2+
* Copyright © 2017 - 2019 Schlichtherle IT Services
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
415
*/
516
package global.namespace.fun.io.bios
617

718
import java.nio.file.Paths
819

920
import org.scalatest.Matchers._
1021
import org.scalatest.WordSpec
11-
import org.scalatest.prop.PropertyChecks._
22+
import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks._
1223

13-
import scala.collection.JavaConverters._
24+
import scala.jdk.CollectionConverters._
1425

1526
/** @author Christian Schlichtherle */
1627
class DirectoryStoreSpec extends WordSpec {

delta/src/test/scala/global/namespace/fun/io/delta/DeltaModelCodecSpec.scala

+17-6
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,33 @@
11
/*
2-
* Copyright (C) 2013-2018 Schlichtherle IT Services.
3-
* All rights reserved. Use is subject to license terms.
2+
* Copyright © 2017 - 2019 Schlichtherle IT Services
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
415
*/
516
package global.namespace.fun.io.delta
617

718
import java.nio.charset.Charset
819
import java.security.MessageDigest
920

21+
import global.namespace.fun.io.api.Store
22+
import global.namespace.fun.io.bios.BIOS.memory
1023
import global.namespace.fun.io.delta.Delta._
1124
import global.namespace.fun.io.delta.DeltaModelCodecSpec._
1225
import global.namespace.fun.io.delta.model.{DeltaModel, EntryNameAndDigestValue, EntryNameAndTwoDigestValues}
13-
import global.namespace.fun.io.api.Store
14-
import global.namespace.fun.io.bios.BIOS.memory
1526
import org.scalatest.Matchers._
1627
import org.scalatest.WordSpec
17-
import org.scalatest.prop.PropertyChecks._
28+
import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks._
1829

19-
import scala.collection.JavaConverters._
30+
import scala.jdk.CollectionConverters._
2031

2132
/** @author Christian Schlichtherle */
2233
class DeltaModelCodecSpec extends WordSpec {

delta/src/test/scala/global/namespace/fun/io/delta/MessageDigestsSpec.scala

+14-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
11
/*
2-
* Copyright (C) 2013-2018 Schlichtherle IT Services.
3-
* All rights reserved. Use is subject to license terms.
2+
* Copyright © 2017 - 2019 Schlichtherle IT Services
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
415
*/
516
package global.namespace.fun.io.delta
617

718
import global.namespace.fun.io.delta.MessageDigests._
819
import org.scalatest.Matchers._
920
import org.scalatest.WordSpec
10-
import org.scalatest.prop.PropertyChecks._
21+
import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks._
1122

1223
/** @author Christian Schlichtherle */
1324
class MessageDigestsSpec extends WordSpec {

it/src/test/scala/global/namespace/fun/io/it/ArchiveSpecContext.scala

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2017 Schlichtherle IT Services
2+
* Copyright © 2017 - 2019 Schlichtherle IT Services
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -41,7 +41,7 @@ trait ArchiveSpecContext {
4141

4242
def withTempArchiveFile(factory: ArchiveStoreFactory)(test: ArchiveStore => Any): Unit = {
4343
val file = File.createTempFile("tmp", null)
44-
file delete ()
44+
file.delete()
4545
try {
4646
test(factory(file))
4747
} finally {
@@ -50,7 +50,7 @@ trait ArchiveSpecContext {
5050
}
5151

5252
private def deleteAll(file: File): Unit = {
53-
Option(file listFiles ()) foreach (_ foreach deleteAll)
54-
file delete ()
53+
Option(file.listFiles()) foreach (_ foreach deleteAll)
54+
file.delete()
5555
}
5656
}

it/src/test/scala/global/namespace/fun/io/it/ArchiveSpecSuite.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2017 Schlichtherle IT Services
2+
* Copyright © 2017 - 2019 Schlichtherle IT Services
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,9 +20,9 @@ import global.namespace.fun.io.delta.Delta.diff
2020
import global.namespace.fun.io.spi.Copy.copy
2121
import org.scalatest.Matchers._
2222
import org.scalatest.WordSpec
23-
import org.scalatest.prop.PropertyChecks._
23+
import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks._
2424

25-
import scala.collection.JavaConverters._
25+
import scala.jdk.CollectionConverters._
2626

2727
/** @author Christian Schlichtherle */
2828
abstract class ArchiveSpecSuite extends WordSpec with ArchiveSpecContext {

it/src/test/scala/global/namespace/fun/io/it/ContentSpec.scala

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2017 Schlichtherle IT Services
2+
* Copyright © 2017 - 2019 Schlichtherle IT Services
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@ import global.namespace.fun.io.bios.BIOS._
2424
import global.namespace.fun.io.scala.api._
2525
import org.scalatest.Matchers._
2626
import org.scalatest.WordSpec
27-
import org.scalatest.prop.PropertyChecks._
27+
import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks._
2828

2929
class ContentSpec extends WordSpec {
3030

@@ -35,7 +35,7 @@ class ContentSpec extends WordSpec {
3535
() => memory,
3636
() => file {
3737
val file = File.createTempFile("tmp", null)
38-
file delete ()
38+
file.delete()
3939
file
4040
},
4141
() => path {
@@ -63,7 +63,7 @@ class ContentSpec extends WordSpec {
6363
new String(store content 3) shouldBe "123"
6464
intercept[ContentTooLargeException](store content 2)
6565

66-
store delete()
66+
store.delete()
6767
store.exists shouldBe false
6868
intercept[IOException](store.content)
6969

@@ -72,7 +72,7 @@ class ContentSpec extends WordSpec {
7272
new String(store content 2) shouldBe "23"
7373
intercept[ContentTooLargeException](store content 1)
7474

75-
store delete()
75+
store.delete()
7676
store.exists shouldBe false
7777
intercept[IOException](store.content)
7878

@@ -81,7 +81,7 @@ class ContentSpec extends WordSpec {
8181
new String(store content 1) shouldBe "3"
8282
intercept[ContentTooLargeException](store content 0)
8383

84-
store delete()
84+
store.delete()
8585
store.exists shouldBe false
8686
intercept[IOException](store.content)
8787

@@ -90,7 +90,7 @@ class ContentSpec extends WordSpec {
9090
new String(store content 0) shouldBe ""
9191
intercept[IllegalArgumentException](store content -1)
9292

93-
store delete()
93+
store.delete()
9494
store.exists shouldBe false
9595
intercept[IOException](store.content)
9696
}

it/src/test/scala/global/namespace/fun/io/it/DiffAndPatchSpecSuite.scala

+14-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
/*
2-
* Copyright (C) 2013-2018 Schlichtherle IT Services.
3-
* All rights reserved. Use is subject to license terms.
2+
* Copyright © 2017 - 2019 Schlichtherle IT Services
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
415
*/
516
package global.namespace.fun.io.it
617

@@ -13,7 +24,7 @@ import global.namespace.fun.io.it.DiffAndPatchSpecSuite._
1324
import org.scalatest.Matchers._
1425
import org.scalatest.WordSpec
1526

16-
import scala.collection.JavaConverters._
27+
import scala.jdk.CollectionConverters._
1728

1829
/** @author Christian Schlichtherle */
1930
abstract class DiffAndPatchSpecSuite extends WordSpec with ArchiveSpecContext {

0 commit comments

Comments
 (0)