本文整理汇总了Golang中github.com/cloudfoundry/cli/cf/api/apifakes.FakeSpaceRepository.CreateReturns方法的典型用法代码示例。如果您正苦于以下问题:Golang FakeSpaceRepository.CreateReturns方法的具体用法?Golang FakeSpaceRepository.CreateReturns怎么用?Golang FakeSpaceRepository.CreateReturns使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/cloudfoundry/cli/cf/api/apifakes.FakeSpaceRepository
的用法示例。
在下文中一共展示了FakeSpaceRepository.CreateReturns方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1:
spaceRoleSetter = commandregistry.Commands.FindCommand("set-space-role").(user.SpaceRoleSetter)
spaceQuotaRepo = new(spacequotasfakes.FakeSpaceQuotaRepository)
flagRepo = new(featureflagsfakes.FakeFeatureFlagRepository)
requirementsFactory = &testreq.FakeReqFactory{LoginSuccess: true, TargetedOrgSuccess: true}
configOrg = models.OrganizationFields{
Name: "my-org",
GUID: "my-org-guid",
}
//save original command and restore later
OriginalCommand = commandregistry.Commands.FindCommand("set-space-role")
spaceRepo = new(apifakes.FakeSpaceRepository)
space := maker.NewSpace(maker.Overrides{"name": "my-space", "guid": "my-space-guid", "organization": configOrg})
spaceRepo.CreateReturns(space, nil)
})
AfterEach(func() {
commandregistry.Register(OriginalCommand)
})
Describe("Requirements", func() {
It("fails with usage when not provided exactly one argument", func() {
runCommand()
Expect(ui.Outputs).To(ContainSubstrings(
[]string{"Incorrect Usage", "Requires", "argument"},
))
})
Context("when not logged in", func() {