本文整理汇总了Golang中github.com/cloudfoundry/cli/cf/api/fakes.FakeServiceBrokerRepository类的典型用法代码示例。如果您正苦于以下问题:Golang FakeServiceBrokerRepository类的具体用法?Golang FakeServiceBrokerRepository怎么用?Golang FakeServiceBrokerRepository使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FakeServiceBrokerRepository类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1:
testconfig "github.com/cloudfoundry/cli/testhelpers/configuration"
testterm "github.com/cloudfoundry/cli/testhelpers/terminal"
. "github.com/cloudfoundry/cli/testhelpers/matchers"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("CreateServiceBroker", func() {
var (
ui *testterm.FakeUI
configRepo core_config.Repository
serviceBrokerRepo *testapi.FakeServiceBrokerRepository
cmd command_registry.Command
deps command_registry.Dependency
factory *fakerequirements.FakeFactory
flagContext flags.FlagContext
loginRequirement requirements.Requirement
targetedSpaceRequirement requirements.Requirement
)
BeforeEach(func() {
ui = &testterm.FakeUI{}
configRepo = testconfig.NewRepositoryWithDefaults()
serviceBrokerRepo = &testapi.FakeServiceBrokerRepository{}
repoLocator := deps.RepoLocator.SetServiceBrokerRepository(serviceBrokerRepo)
deps = command_registry.Dependency{
Ui: ui,
开发者ID:pcf-toronto-ci-bot,项目名称:cli,代码行数:31,代码来源:create_service_broker_test.go
示例2:
"github.com/cloudfoundry/cli/cf/errors"
"github.com/cloudfoundry/cli/cf/models"
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("delete-service-broker command", func() {
var (
ui *testterm.FakeUI
configRepo core_config.Repository
brokerRepo *testapi.FakeServiceBrokerRepository
requirementsFactory *testreq.FakeReqFactory
deps command_registry.Dependency
)
updateCommandDependency := func(pluginCall bool) {
deps.Ui = ui
deps.RepoLocator = deps.RepoLocator.SetServiceBrokerRepository(brokerRepo)
deps.Config = configRepo
command_registry.Commands.SetCommand(command_registry.Commands.FindCommand("delete-service-broker").SetDependency(deps, pluginCall))
}
BeforeEach(func() {
ui = &testterm.FakeUI{Inputs: []string{"y"}}
brokerRepo = &testapi.FakeServiceBrokerRepository{}
configRepo = testconfig.NewRepositoryWithDefaults()
开发者ID:pcf-toronto-ci-bot,项目名称:cli,代码行数:31,代码来源:delete_service_broker_test.go
示例3:
"github.com/cloudfoundry/cli/cf/models"
testcmd "github.com/cloudfoundry/cli/testhelpers/commands"
testconfig "github.com/cloudfoundry/cli/testhelpers/configuration"
testreq "github.com/cloudfoundry/cli/testhelpers/requirements"
testterm "github.com/cloudfoundry/cli/testhelpers/terminal"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/cloudfoundry/cli/testhelpers/matchers"
)
var _ = Describe("update-service-broker command", func() {
var (
ui *testterm.FakeUI
requirementsFactory *testreq.FakeReqFactory
configRepo core_config.Repository
serviceBrokerRepo *testapi.FakeServiceBrokerRepository
deps command_registry.Dependency
)
updateCommandDependency := func(pluginCall bool) {
deps.Ui = ui
deps.RepoLocator = deps.RepoLocator.SetServiceBrokerRepository(serviceBrokerRepo)
deps.Config = configRepo
command_registry.Commands.SetCommand(command_registry.Commands.FindCommand("update-service-broker").SetDependency(deps, pluginCall))
}
BeforeEach(func() {
configRepo = testconfig.NewRepositoryWithDefaults()
ui = &testterm.FakeUI{}
requirementsFactory = &testreq.FakeReqFactory{}
开发者ID:pcf-toronto-ci-bot,项目名称:cli,代码行数:31,代码来源:update_service_broker_test.go
示例4:
fake_service_builder "github.com/cloudfoundry/cli/cf/actors/service_builder/fakes"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("Broker Builder", func() {
var (
brokerBuilder broker_builder.BrokerBuilder
serviceBuilder *fake_service_builder.FakeServiceBuilder
brokerRepo *fakes.FakeServiceBrokerRepository
serviceBroker1 models.ServiceBroker
services models.ServiceOfferings
service1 models.ServiceOffering
service2 models.ServiceOffering
service3 models.ServiceOffering
publicServicePlan models.ServicePlanFields
privateServicePlan models.ServicePlanFields
)
BeforeEach(func() {
brokerRepo = &fakes.FakeServiceBrokerRepository{}
serviceBuilder = &fake_service_builder.FakeServiceBuilder{}
brokerBuilder = broker_builder.NewBuilder(brokerRepo, serviceBuilder)
serviceBroker1 = models.ServiceBroker{Guid: "my-service-broker-guid", Name: "my-service-broker"}
开发者ID:pcf-toronto-ci-bot,项目名称:cli,代码行数:29,代码来源:broker_builder_test.go
示例5:
"github.com/cloudfoundry/cli/cf/configuration/core_config"
"github.com/cloudfoundry/cli/cf/models"
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("rename-service-broker command", func() {
var (
ui *testterm.FakeUI
requirementsFactory *testreq.FakeReqFactory
configRepo core_config.Repository
serviceBrokerRepo *testapi.FakeServiceBrokerRepository
deps command_registry.Dependency
)
updateCommandDependency := func(pluginCall bool) {
deps.Ui = ui
deps.RepoLocator = deps.RepoLocator.SetServiceBrokerRepository(serviceBrokerRepo)
deps.Config = configRepo
command_registry.Commands.SetCommand(command_registry.Commands.FindCommand("rename-service-broker").SetDependency(deps, pluginCall))
}
BeforeEach(func() {
configRepo = testconfig.NewRepositoryWithDefaults()
ui = &testterm.FakeUI{}
开发者ID:pcf-toronto-ci-bot,项目名称:cli,代码行数:31,代码来源:rename_service_broker_test.go
示例6:
testconfig "github.com/cloudfoundry/cli/testhelpers/configuration"
testreq "github.com/cloudfoundry/cli/testhelpers/requirements"
testterm "github.com/cloudfoundry/cli/testhelpers/terminal"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"strings"
. "github.com/cloudfoundry/cli/testhelpers/matchers"
)
var _ = Describe("service-brokers command", func() {
var (
ui *testterm.FakeUI
config core_config.Repository
repo *testapi.FakeServiceBrokerRepository
requirementsFactory *testreq.FakeReqFactory
deps command_registry.Dependency
)
updateCommandDependency := func(pluginCall bool) {
deps.Ui = ui
deps.RepoLocator = deps.RepoLocator.SetServiceBrokerRepository(repo)
deps.Config = config
command_registry.Commands.SetCommand(command_registry.Commands.FindCommand("service-brokers").SetDependency(deps, pluginCall))
}
BeforeEach(func() {
ui = &testterm.FakeUI{}
config = testconfig.NewRepositoryWithDefaults()
repo = &testapi.FakeServiceBrokerRepository{}
开发者ID:pcf-toronto-ci-bot,项目名称:cli,代码行数:31,代码来源:service_brokers_test.go
注:本文中的github.com/cloudfoundry/cli/cf/api/fakes.FakeServiceBrokerRepository类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论