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

pl.touk.nussknacker.engine.api.test.EmptyInvocationCollector.scala Maven / Gradle / Ivy

The newest version!
package pl.touk.nussknacker.engine.api.test

import pl.touk.nussknacker.engine.api.test.InvocationCollectors.{ServiceInvocationCollector, ToCollect}

import scala.concurrent.{ExecutionContext, Future}

//This implementation should be used only for unit tests of services
object EmptyInvocationCollector {

  implicit val Instance: ServiceInvocationCollector = new ServiceInvocationCollector {

    override def collectWithResponse[A](request: => ToCollect, mockValue: Option[A])(
        action: => Future[InvocationCollectors.CollectableAction[A]],
        names: InvocationCollectors.TransmissionNames
    )(implicit ec: ExecutionContext): Future[A] = action.map(_.result)

  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy