blob: 6618f021026ef672fd8917365a7850980ee21b84 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
package tools.test.osgi
package libonly
import org.junit.Assert._
import org.ops4j.pax.exam.CoreOptions._
import org.junit.Test
import org.junit.runner.RunWith
import org.ops4j.pax.exam
import org.ops4j.pax.exam.junit.{
Configuration,
ExamReactorStrategy,
JUnit4TestRunner
}
import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory
import org.ops4j.pax.swissbox.framework.ServiceLookup
import org.osgi.framework.BundleContext
@RunWith(classOf[JUnit4TestRunner])
@ExamReactorStrategy(Array(classOf[AllConfinedStagedReactorFactory]))
class BasicLibraryTest extends ScalaOsgiHelper {
@Configuration
def config(): Array[exam.Option] =
justCoreLibraryOptions
@Test
def everythingLoads(): Unit = {
// Note - This tests sun.misc usage.
import scala.concurrent._
import scala.concurrent.duration.Duration.Inf
import ExecutionContext.Implicits._
val x = Future(2) map (_ + 1)
assertEquals(3, Await.result(x, Inf))
}
}
|