本文整理汇总了Scala中org.mockito.Mockito.mock类的典型用法代码示例。如果您正苦于以下问题:Scala mock类的具体用法?Scala mock怎么用?Scala mock使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了mock类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Scala代码示例。
示例1:
//设置package包名称以及导入依赖的类
package uk.co.telegraph.plugin.pipeline
import cats.{Id, ~>}
import com.amazonaws.services.cloudformation.model.Stack
import org.mockito.Mockito.mock
import sbt._
import uk.co.telegraph.cloud.{AuthProfile, CloudInstruction, JsonFormat}
package object tasks {
val SampleStackName : String = "test-stack"
val SampleStackRegion : String = "eu-west-1"
val SampleStackAuth : StackAuth = AuthProfile()
val SampleStackCapabilities : Seq[String] = Seq("CAPABILITY_IAM")
val SampleStackTags : Map[String, String] = Map("Billing" -> "Platforms")
val SampleParamPath : File = file("params.file")
val SampleParamCustom : StackParams = Map.empty
val SampleTemplateS3Uri : URI = uri("s3://sample-bucket")
val SampleEnvironment : String = "static"
val SampleLogger : Logger = mock(classOf[Logger])
val SampleStackStatus : String = "COMPLETE"
val SampleTemplateFormat : StackTemplateFormat = JsonFormat
val SampleStackInfo : Stack = new Stack()
.withStackName(SampleStackName)
val MockInterpreter: ~>[CloudInstruction, Id] = mock(classOf[CloudInstruction ~> Id])
}