summaryrefslogtreecommitdiffstats
path: root/bundle-plugin
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorn.christian@seime.no>2017-07-11 16:08:49 +0200
committerGitHub <noreply@github.com>2017-07-11 16:08:49 +0200
commit730fd6edd9569cd328ccabf3655394bb9ad081f1 (patch)
tree0dc8b15d25af7aebfbfa49da99ffd79faad4ba27 /bundle-plugin
parent2ceac3d88f57d218ced860eec76d60dd9d05fb99 (diff)
Revert "Bjorncs/scala stuff"
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, 22 insertions, 30 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 1b3979476bd..f1bbf644ac6 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.io.File
import java.util.jar.{Manifest => JarManifest}
-
-import com.yahoo.container.plugin.osgi.ExportPackageParser
-import com.yahoo.container.plugin.osgi.ExportPackages.Export
+import java.io.File
+import com.yahoo.container.plugin.osgi.{ExportPackages, ExportPackageParser}
+import ExportPackages.Export
+import collection.immutable.LinearSeq
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 3ef1b1fea87..cf6ae3ccf9c 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,18 +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.bundle
-import org.scalatest.junit.{AssertionsForJUnit, JUnitSuite}
+import org.scalatest.junit.{JUnitSuite, ShouldMatchersForJUnit}
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 AssertionsForJUnit with Matchers {
+class AnalyzeBundleTest extends JUnitSuite with ShouldMatchersForJUnit {
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 e2d0e3c6f10..3377315e3d8 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,22 +2,19 @@
package com.yahoo.container.plugin.classanalysis
import org.junit.Test
-import org.scalatest.junit.{AssertionsForJUnit, JUnitSuite}
+import org.scalatest.junit.{ShouldMatchersForJUnit, 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 AssertionsForJUnit with Matchers {
+class AnalyzeClassTest extends JUnitSuite with ShouldMatchersForJUnit {
@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 43f52884f39..231aba36325 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,19 +1,17 @@
// 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.{AssertionsForJUnit, JUnitSuite}
+import org.scalatest.junit.{JUnitSuite, ShouldMatchersForJUnit}
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 AssertionsForJUnit with Matchers {
+class AnalyzeMethodBodyTest extends JUnitSuite with ShouldMatchersForJUnit {
@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 5ddc7fef16d..37399ec8c00 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.{AssertionsForJUnit, JUnitSuite}
+import org.scalatest.junit.{JUnitSuite, ShouldMatchersForJUnit}
import org.junit.Test
-import ExportPackages.{Export, Parameter}
-import org.scalatest.Matchers
+
+import ExportPackages.{Parameter, Export}
/**
* @author tonytv
*/
-class ExportPackageParserTest extends JUnitSuite with AssertionsForJUnit with Matchers {
+class ExportPackageParserTest extends JUnitSuite with ShouldMatchersForJUnit {
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 4011f170da9..b39c8da7df6 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.{AssertionsForJUnit, JUnitSuite}
+import org.scalatest.junit.{JUnitSuite, ShouldMatchersForJUnit}
import org.junit.Test
+
import ImportPackages.Import
-import ExportPackages.{Export, Parameter}
-import org.scalatest.Matchers
+import ExportPackages.{Parameter, Export}
/**
* @author tonytv
*/
-class ImportPackageTest extends JUnitSuite with AssertionsForJUnit with Matchers {
+class ImportPackageTest extends JUnitSuite with ShouldMatchersForJUnit {
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 7efb0392f5e..d96273d81e1 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,23 +1,22 @@
// 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.{AssertionsForJUnit, JUnitSuite}
+import org.scalatest.junit.{JUnitSuite, ShouldMatchersForJUnit}
import org.junit.Test
+
import IO.using
import java.io.Closeable
-import org.scalatest.Matchers
-
/**
* @author tonytv
*/
-class IOTest extends JUnitSuite with AssertionsForJUnit with Matchers {
+class IOTest extends JUnitSuite with ShouldMatchersForJUnit {
class ClosingException extends RuntimeException
class FunctionException extends RuntimeException
object throwWhenClosingResource extends Closeable {
def close() {
- throw new ClosingException()
+ throw new ClosingException();
}
}