本文整理汇总了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)
})