All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.scalatest.AsyncTestHolder.scala Maven / Gradle / Ivy


package org.scalatest

import scala.util.{Success, Try, Failure}
import scala.concurrent.{ExecutionContext, Future, Await}
import scala.concurrent.duration._

private[scalatest] sealed trait AsyncTestHolder {
  def toFutureOutcome: FutureOutcome
}

private[scalatest] case class PastAsyncTestHolder(past: Outcome) extends AsyncTestHolder {
  def toFutureOutcome: FutureOutcome = FutureOutcome { Future.successful(past) }
}

private[scalatest] case class FutureAsyncTestHolder(future: Future[Outcome]) extends AsyncTestHolder {
  def toFutureOutcome: FutureOutcome = FutureOutcome { future }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy