本文整理匯總了Golang中github.com/cloudfoundry/cli/cf/api/security_groups/spaces/fakes.FakeSecurityGroupSpaceBinder類的典型用法代碼示例。如果您正苦於以下問題:Golang FakeSecurityGroupSpaceBinder類的具體用法?Golang FakeSecurityGroupSpaceBinder怎麽用?Golang FakeSecurityGroupSpaceBinder使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了FakeSecurityGroupSpaceBinder類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1:
fakeBinder "github.com/cloudfoundry/cli/cf/api/security_groups/spaces/fakes"
testcmd "github.com/cloudfoundry/cli/testhelpers/commands"
testconfig "github.com/cloudfoundry/cli/testhelpers/configuration"
. "github.com/cloudfoundry/cli/testhelpers/matchers"
testreq "github.com/cloudfoundry/cli/testhelpers/requirements"
testterm "github.com/cloudfoundry/cli/testhelpers/terminal"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("unbind-security-group command", func() {
var (
ui *testterm.FakeUI
securityGroupRepo *fakeSecurityGroup.FakeSecurityGroupRepo
orgRepo *fake_org.FakeOrganizationRepository
spaceRepo *fakes.FakeSpaceRepository
secBinder *fakeBinder.FakeSecurityGroupSpaceBinder
requirementsFactory *testreq.FakeReqFactory
configRepo core_config.Repository
deps command_registry.Dependency
)
updateCommandDependency := func(pluginCall bool) {
deps.Ui = ui
deps.RepoLocator = deps.RepoLocator.SetSpaceRepository(spaceRepo)
deps.RepoLocator = deps.RepoLocator.SetOrganizationRepository(orgRepo)
deps.RepoLocator = deps.RepoLocator.SetSecurityGroupRepository(securityGroupRepo)
deps.RepoLocator = deps.RepoLocator.SetSecurityGroupSpaceBinder(secBinder)
deps.Config = configRepo
command_registry.Commands.SetCommand(command_registry.Commands.FindCommand("unbind-security-group").SetDependency(deps, pluginCall))
}
示例2:
testconfig "github.com/cloudfoundry/cli/testhelpers/configuration"
testreq "github.com/cloudfoundry/cli/testhelpers/requirements"
testterm "github.com/cloudfoundry/cli/testhelpers/terminal"
. "github.com/cloudfoundry/cli/cf/commands/securitygroup"
. "github.com/cloudfoundry/cli/testhelpers/matchers"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("bind-security-group command", func() {
var (
ui *testterm.FakeUI
cmd BindSecurityGroup
configRepo core_config.ReadWriter
fakeSecurityGroupRepo *testapi.FakeSecurityGroupRepo
requirementsFactory *testreq.FakeReqFactory
fakeSpaceRepo *fakes.FakeSpaceRepository
fakeOrgRepo *test_org.FakeOrganizationRepository
fakeSpaceBinder *zoidberg.FakeSecurityGroupSpaceBinder
)
BeforeEach(func() {
ui = &testterm.FakeUI{}
fakeOrgRepo = &test_org.FakeOrganizationRepository{}
fakeSpaceRepo = &fakes.FakeSpaceRepository{}
requirementsFactory = &testreq.FakeReqFactory{}
fakeSecurityGroupRepo = &testapi.FakeSecurityGroupRepo{}
configRepo = testconfig.NewRepositoryWithDefaults()
fakeSpaceBinder = &zoidberg.FakeSecurityGroupSpaceBinder{}
cmd = NewBindSecurityGroup(ui, configRepo, fakeSecurityGroupRepo, fakeSpaceRepo, fakeOrgRepo, fakeSpaceBinder)
})