summaryrefslogtreecommitdiffstats
path: root/bundle-plugin
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@yahoo-inc.com>2017-07-11 14:48:36 +0200
committerBjørn Christian Seime <bjorncs@yahoo-inc.com>2017-07-11 17:47:10 +0200
commit8674b0c8963782535b8a779783455e9699b5644d (patch)
treea824f8557a9c92f44b5e66b1c2b81134d0f9297e /bundle-plugin
parent680acc25df067e19f4b8933b8f68e9bff4596d76 (diff)
ShouldMatchersForJUnit is removed from scala-test v3
Diffstat (limited to 'bundle-plugin')
-rw-r--r--bundle-plugin/src/main/scala/com/yahoo/container/plugin/bundle/AnalyzeBundle.scala8
-rw-r--r--bundle-plugin/src/test/scala/com/yahoo/container/plugin/bundle/AnalyzeBundleTest.scala6
-rw-r--r--bundle-plugin/src/test/scala/com/yahoo/container/plugin/classanalysis/AnalyzeClassTest.scala7
-rw-r--r--bundle-plugin/src/test/scala/com/yahoo/container/plugin/classanalysis/AnalyzeMethodBodyTest.scala6
-rw-r--r--bundle-plugin/src/test/scala/com/yahoo/container/plugin/osgi/ExportPackageParserTest.scala8
-rw-r--r--bundle-plugin/src/test/scala/com/yahoo/container/plugin/osgi/ImportPackageTest.scala8
-rw-r--r--bundle-plugin/src/test/scala/com/yahoo/container/plugin/util/IOTest.scala9
7 files changed, 30 insertions, 22 deletions
diff --git a/bundle-plugin/src/main/scala/com/yahoo/container/plugin/bundle/AnalyzeBundle.scala b/bundle-plugin/src/main/scala/com/yahoo/container/plugin/bundle/AnalyzeBundle.scala
index f1bbf644ac6..1b3979476bd 100644
--- a/bundle-plugin/src/main/scala/com/yahoo/container/plugin/bundle/AnalyzeBundle.scala
+++ b/bundle-plugin/src/main/scala/com/yahoo/container/plugin/bundle/AnalyzeBundle.scala
@@ -1,11 +1,11 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.container.plugin.bundle
-import java.util.jar.{Manifest => JarManifest}
import java.io.File
-import com.yahoo.container.plugin.osgi.{ExportPackages, ExportPackageParser}
-import ExportPackages.Export
-import collection.immutable.LinearSeq
+import java.util.jar.{Manifest => JarManifest}
+
+import com.yahoo.container.plugin.osgi.ExportPackageParser
+import com.yahoo.container.plugin.osgi.ExportPackages.Export
import com.yahoo.container.plugin.util.JarFiles
diff --git a/bundle-plugin/src/test/scala/com/yahoo/container/plugin/bundle/AnalyzeBundleTest.scala b/bundle-plugin/src/test/scala/com/yahoo/container/plugin/bundle/AnalyzeBundleTest.scala
index cf6ae3ccf9c..3ef1b1fea87 100644
--- a/bundle-plugin/src/test/scala/com/yahoo/container/plugin/bundle/AnalyzeBundleTest.scala
+++ b/bundle-plugin/src/test/scala/com/yahoo/container/plugin/bundle/AnalyzeBundleTest.scala
@@ -1,16 +1,18 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.container.plugin.bundle
-import org.scalatest.junit.{JUnitSuite, ShouldMatchersForJUnit}
+import org.scalatest.junit.{AssertionsForJUnit, JUnitSuite}
import org.junit.Test
import com.yahoo.container.plugin.bundle.AnalyzeBundle.PublicPackages
import com.yahoo.container.plugin.osgi.ExportPackages
import java.io.File
+import org.scalatest.Matchers
+
/**
* @author tonytv
*/
-class AnalyzeBundleTest extends JUnitSuite with ShouldMatchersForJUnit {
+class AnalyzeBundleTest extends JUnitSuite with AssertionsForJUnit with Matchers {
val jarDir = new File("src/test/resources/jar")
val PublicPackages(exports, globals) = AnalyzeBundle.publicPackagesAggregated(
diff --git a/bundle-plugin/src/test/scala/com/yahoo/container/plugin/classanalysis/AnalyzeClassTest.scala b/bundle-plugin/src/test/scala/com/yahoo/container/plugin/classanalysis/AnalyzeClassTest.scala
index 3377315e3d8..e2d0e3c6f10 100644
--- a/bundle-plugin/src/test/scala/com/yahoo/container/plugin/classanalysis/AnalyzeClassTest.scala
+++ b/bundle-plugin/src/test/scala/com/yahoo/container/plugin/classanalysis/AnalyzeClassTest.scala
@@ -2,19 +2,22 @@
package com.yahoo.container.plugin.classanalysis
import org.junit.Test
-import org.scalatest.junit.{ShouldMatchersForJUnit, JUnitSuite}
+import org.scalatest.junit.{AssertionsForJUnit, JUnitSuite}
import java.awt.Image
import java.awt.image.{ImagingOpException, Kernel}
+
import sampleclasses._
import TestUtilities._
import com.yahoo.osgi.annotation.{ExportPackage, Version}
import javax.security.auth.login.LoginException
+import org.scalatest.Matchers
+
/**
* Tests that analysis of class files works.
* @author tonytv
*/
-class AnalyzeClassTest extends JUnitSuite with ShouldMatchersForJUnit {
+class AnalyzeClassTest extends JUnitSuite with AssertionsForJUnit with Matchers {
@Test def require_that_full_class_name_is_returned() {
analyzeClass[Base].name should be(name[Base])
}
diff --git a/bundle-plugin/src/test/scala/com/yahoo/container/plugin/classanalysis/AnalyzeMethodBodyTest.scala b/bundle-plugin/src/test/scala/com/yahoo/container/plugin/classanalysis/AnalyzeMethodBodyTest.scala
index 231aba36325..43f52884f39 100644
--- a/bundle-plugin/src/test/scala/com/yahoo/container/plugin/classanalysis/AnalyzeMethodBodyTest.scala
+++ b/bundle-plugin/src/test/scala/com/yahoo/container/plugin/classanalysis/AnalyzeMethodBodyTest.scala
@@ -1,17 +1,19 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.container.plugin.classanalysis
-import org.scalatest.junit.{JUnitSuite, ShouldMatchersForJUnit}
+import org.scalatest.junit.{AssertionsForJUnit, JUnitSuite}
import sampleclasses._
import TestUtilities._
import org.junit.Test
import java.io.PrintStream
+import org.scalatest.Matchers
+
/**
* Tests that classes used in method bodies are included in the imports list.
* @author tonytv
*/
-class AnalyzeMethodBodyTest extends JUnitSuite with ShouldMatchersForJUnit {
+class AnalyzeMethodBodyTest extends JUnitSuite with AssertionsForJUnit with Matchers {
@Test def require_that_class_of_locals_are_included() {
analyzeClass[Methods].referencedClasses should contain(name[Base])
}
diff --git a/bundle-plugin/src/test/scala/com/yahoo/container/plugin/osgi/ExportPackageParserTest.scala b/bundle-plugin/src/test/scala/com/yahoo/container/plugin/osgi/ExportPackageParserTest.scala
index 37399ec8c00..5ddc7fef16d 100644
--- a/bundle-plugin/src/test/scala/com/yahoo/container/plugin/osgi/ExportPackageParserTest.scala
+++ b/bundle-plugin/src/test/scala/com/yahoo/container/plugin/osgi/ExportPackageParserTest.scala
@@ -1,15 +1,15 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.container.plugin.osgi
-import org.scalatest.junit.{JUnitSuite, ShouldMatchersForJUnit}
+import org.scalatest.junit.{AssertionsForJUnit, JUnitSuite}
import org.junit.Test
-
-import ExportPackages.{Parameter, Export}
+import ExportPackages.{Export, Parameter}
+import org.scalatest.Matchers
/**
* @author tonytv
*/
-class ExportPackageParserTest extends JUnitSuite with ShouldMatchersForJUnit {
+class ExportPackageParserTest extends JUnitSuite with AssertionsForJUnit with Matchers {
val versionParameter = Parameter("version", "1.2.3.sample")
@Test
diff --git a/bundle-plugin/src/test/scala/com/yahoo/container/plugin/osgi/ImportPackageTest.scala b/bundle-plugin/src/test/scala/com/yahoo/container/plugin/osgi/ImportPackageTest.scala
index b39c8da7df6..4011f170da9 100644
--- a/bundle-plugin/src/test/scala/com/yahoo/container/plugin/osgi/ImportPackageTest.scala
+++ b/bundle-plugin/src/test/scala/com/yahoo/container/plugin/osgi/ImportPackageTest.scala
@@ -1,16 +1,16 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.container.plugin.osgi
-import org.scalatest.junit.{JUnitSuite, ShouldMatchersForJUnit}
+import org.scalatest.junit.{AssertionsForJUnit, JUnitSuite}
import org.junit.Test
-
import ImportPackages.Import
-import ExportPackages.{Parameter, Export}
+import ExportPackages.{Export, Parameter}
+import org.scalatest.Matchers
/**
* @author tonytv
*/
-class ImportPackageTest extends JUnitSuite with ShouldMatchersForJUnit {
+class ImportPackageTest extends JUnitSuite with AssertionsForJUnit with Matchers {
val referencedPackages = Set("com.yahoo.exported")
val exports = exportByPackageName(Export(List("com.yahoo.exported"), List()))
val exportsWithVersion = exportByPackageName(exports.head._2.copy(parameters = List(Parameter("version", "1.3"))))
diff --git a/bundle-plugin/src/test/scala/com/yahoo/container/plugin/util/IOTest.scala b/bundle-plugin/src/test/scala/com/yahoo/container/plugin/util/IOTest.scala
index d96273d81e1..7efb0392f5e 100644
--- a/bundle-plugin/src/test/scala/com/yahoo/container/plugin/util/IOTest.scala
+++ b/bundle-plugin/src/test/scala/com/yahoo/container/plugin/util/IOTest.scala
@@ -1,22 +1,23 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.container.plugin.util
-import org.scalatest.junit.{JUnitSuite, ShouldMatchersForJUnit}
+import org.scalatest.junit.{AssertionsForJUnit, JUnitSuite}
import org.junit.Test
-
import IO.using
import java.io.Closeable
+import org.scalatest.Matchers
+
/**
* @author tonytv
*/
-class IOTest extends JUnitSuite with ShouldMatchersForJUnit {
+class IOTest extends JUnitSuite with AssertionsForJUnit with Matchers {
class ClosingException extends RuntimeException
class FunctionException extends RuntimeException
object throwWhenClosingResource extends Closeable {
def close() {
- throw new ClosingException();
+ throw new ClosingException()
}
}