summaryrefslogtreecommitdiff
path: root/test/osgi/src/BasicLibrary.scala
blob: 38dea69e99ba92ffffc3e5b340ea0feb860eb24e (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.util.Duration.Inf
     import ExecutionContext.Implicits._
     val x = Future(2) map (_ + 1)
     assertEquals(3, Await.result(x, Inf))
  }
}