本文整理汇总了Scala中uk.gov.hmrc.domain.Generator类的典型用法代码示例。如果您正苦于以下问题:Scala Generator类的具体用法?Scala Generator怎么用?Scala Generator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Generator类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Scala代码示例。
示例1: PreconditionBuilder
//设置package包名称以及导入依赖的类
package uk.gov.hmrc.agentinvitations.support
import uk.gov.hmrc.agentinvitations.stubs._
import uk.gov.hmrc.agentmtdidentifiers.model.Arn
import uk.gov.hmrc.domain.{AgentCode, Generator, Nino}
trait StubUtils {
me: StartAndStopWireMock =>
class PreconditionBuilder {
def agentAdmin(arn: String, agentCode: String): AgentAdmin = {
AgentAdmin(arn, oid = "556737e15500005500eaf68e", agentCode)
}
def agentAdmin(arn: Arn, agentCode: AgentCode): AgentAdmin = {
agentAdmin(arn.value, agentCode.value)
}
def user(oid: String = "1234567890abcdef00000000"): UnknownUser = {
UnknownUser(oid)
}
def client(oid: String = "556737e15500005500eaf68f", clientId: Nino = new Generator().nextNino): Client = {
Client(oid, clientId)
}
}
def given() = {
new PreconditionBuilder()
}
class BaseUser extends WiremockAware {
override def wiremockBaseUrl: String = me.wiremockBaseUrl
}
case class AgentAdmin(
override val arn: String,
override val oid: String,
override val agentCode: String)
extends BaseUser with AgentAuthStubs[AgentAdmin] {
}
case class UnknownUser(override val oid: String)
extends BaseUser with UnknownUserAuthStubs[UnknownUser]
case class Client(override val oid: String, override val clientId: Nino)
extends BaseUser with ClientUserAuthStubs[Client] with RelationshipStubs[Client] with DesStubs[Client]
}