本文整理匯總了Golang中code/cloudfoundry/org/cli/cf/api/spaces/spacesfakes.FakeSpaceRepository.CreateReturns方法的典型用法代碼示例。如果您正苦於以下問題:Golang FakeSpaceRepository.CreateReturns方法的具體用法?Golang FakeSpaceRepository.CreateReturns怎麽用?Golang FakeSpaceRepository.CreateReturns使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類code/cloudfoundry/org/cli/cf/api/spaces/spacesfakes.FakeSpaceRepository
的用法示例。
在下文中一共展示了FakeSpaceRepository.CreateReturns方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1:
requirementsFactory.NewLoginRequirementReturns(requirements.Passing{})
requirementsFactory.NewTargetedOrgRequirementReturns(new(requirementsfakes.FakeTargetedOrgRequirement))
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(spacesfakes.FakeSpaceRepository)
space := models.Space{SpaceFields: models.SpaceFields{
Name: "my-space",
GUID: "my-space-guid",
}}
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() {