diff options
author | Bjørn Christian Seime <bjorncs@yahoo-inc.com> | 2017-07-19 13:40:35 +0200 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@yahoo-inc.com> | 2017-07-20 13:15:21 +0200 |
commit | 43298ad59815c9731e0d2f0cd8604af08a119021 (patch) | |
tree | d8b3a52ec2d618e66f107181a5c791ba63ec5b07 /application | |
parent | 94e3449f4b57647b199a03e2e59f91ee902b35eb (diff) |
Rewrite ProjectBundleClassPaths to Java
Diffstat (limited to 'application')
-rw-r--r-- | application/src/test/scala/com/yahoo/application/container/jersey/JerseyTest.scala | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/application/src/test/scala/com/yahoo/application/container/jersey/JerseyTest.scala b/application/src/test/scala/com/yahoo/application/container/jersey/JerseyTest.scala index a199c28a4b2..2aee68f254a 100644 --- a/application/src/test/scala/com/yahoo/application/container/jersey/JerseyTest.scala +++ b/application/src/test/scala/com/yahoo/application/container/jersey/JerseyTest.scala @@ -8,8 +8,8 @@ import com.yahoo.application.Networking import com.yahoo.application.container.JDiscTest._ import com.yahoo.container.test.jars.jersey.resources.TestResourceBase import com.yahoo.container.test.jars.jersey.{resources => jarResources} -import com.yahoo.vespa.scalalib.osgi.maven.ProjectBundleClassPaths -import com.yahoo.vespa.scalalib.osgi.maven.ProjectBundleClassPaths.BundleClasspathMapping +import com.yahoo.osgi.maven.ProjectBundleClassPaths +import com.yahoo.osgi.maven.ProjectBundleClassPaths.BundleClasspathMapping import org.apache.http.HttpResponse import org.apache.http.client.methods.HttpGet import org.apache.http.impl.client.HttpClientBuilder @@ -18,6 +18,7 @@ import org.hamcrest.CoreMatchers.is import org.junit.Assert._ import org.junit.Test +import scala.collection.JavaConverters._ import scala.io.Source /** @@ -51,11 +52,11 @@ class JerseyTest { @Test def jersey_resources_in_provided_dependencies_can_be_invoked_from_application(): Unit = { - val providedDependency = BundleClasspathMapping(bundleSymbolicName, List(testClassesDirectory)) + val providedDependency = new BundleClasspathMapping(bundleSymbolicName, List(testClassesDirectory).asJava) - save(ProjectBundleClassPaths( - mainBundle = BundleClasspathMapping("main", List()), - providedDependencies = List(providedDependency))) + save(new ProjectBundleClassPaths( + new BundleClasspathMapping("main", List().asJava), + List(providedDependency).asJava)) with_jersey_resources() { httpGetter => assertResourcesResponds(classPathResources, httpGetter) @@ -153,12 +154,12 @@ class JerseyTest { } def saveMainBundleClassPathMappings(classPathElement: String): Unit = { - val mainBundleClassPathMappings = BundleClasspathMapping(bundleSymbolicName, List(classPathElement)) - save(ProjectBundleClassPaths(mainBundleClassPathMappings, providedDependencies = List())) + val mainBundleClassPathMappings = new BundleClasspathMapping(bundleSymbolicName, List(classPathElement).asJava) + save(new ProjectBundleClassPaths(mainBundleClassPathMappings, List().asJava)) } def save(projectBundleClassPaths: ProjectBundleClassPaths): Unit = { - val path = Paths.get(testClassesDirectory).resolve(ProjectBundleClassPaths.classPathMappingsFileName) + val path = Paths.get(testClassesDirectory).resolve(ProjectBundleClassPaths.CLASSPATH_MAPPINGS_FILENAME) ProjectBundleClassPaths.save(path, projectBundleClassPaths) } |