本文整理汇总了Golang中github.com/cloudfoundry/cli/cf/api/apifakes.FakeDomainRepository.CreateArgsForCall方法的典型用法代码示例。如果您正苦于以下问题:Golang FakeDomainRepository.CreateArgsForCall方法的具体用法?Golang FakeDomainRepository.CreateArgsForCall怎么用?Golang FakeDomainRepository.CreateArgsForCall使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/cloudfoundry/cli/cf/api/apifakes.FakeDomainRepository
的用法示例。
在下文中一共展示了FakeDomainRepository.CreateArgsForCall方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1:
Context("checks login", func() {
It("passes when logged in", func() {
Expect(runCommand("my-org", "example.com")).To(BeTrue())
Expect(requirementsFactory.OrganizationName).To(Equal("my-org"))
})
It("fails when not logged in", func() {
requirementsFactory = &testreq.FakeReqFactory{LoginSuccess: false}
Expect(runCommand("my-org", "example.com")).To(BeFalse())
})
})
It("creates a domain", func() {
org := models.Organization{}
org.Name = "myOrg"
org.GUID = "myOrg-guid"
requirementsFactory = &testreq.FakeReqFactory{LoginSuccess: true, Organization: org}
runCommand("myOrg", "example.com")
domainName, domainOwningOrgGUID := domainRepo.CreateArgsForCall(0)
Expect(domainName).To(Equal("example.com"))
Expect(domainOwningOrgGUID).To(Equal("myOrg-guid"))
Expect(ui.Outputs).To(ContainSubstrings(
[]string{"Creating domain", "example.com", "myOrg", "my-user"},
[]string{"OK"},
))
})
})