本文整理汇总了Golang中code/cloudfoundry/org/cli/cf/api/apifakes.FakeDomainRepository.CreateArgsForCall方法的典型用法代码示例。如果您正苦于以下问题:Golang FakeDomainRepository.CreateArgsForCall方法的具体用法?Golang FakeDomainRepository.CreateArgsForCall怎么用?Golang FakeDomainRepository.CreateArgsForCall使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类code/cloudfoundry/org/cli/cf/api/apifakes.FakeDomainRepository
的用法示例。
在下文中一共展示了FakeDomainRepository.CreateArgsForCall方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1:
Expect(runCommand("my-org", "example.com")).To(BeTrue())
Expect(ui.Outputs()).To(ContainSubstrings([]string{"my-org"}))
})
It("fails when not logged in", func() {
requirementsFactory.NewLoginRequirementReturns(requirements.Failing{Message: "not logged in"})
Expect(runCommand("my-org", "example.com")).To(BeFalse())
})
})
It("creates a domain", func() {
org := models.Organization{}
org.Name = "myOrg"
org.GUID = "myOrg-guid"
fakeOrgRequirement := new(requirementsfakes.FakeOrganizationRequirement)
fakeOrgRequirement.GetOrganizationReturns(org)
requirementsFactory.NewOrganizationRequirementReturns(fakeOrgRequirement)
requirementsFactory.NewLoginRequirementReturns(requirements.Passing{})
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"},
))
})
})