本文整理汇总了Golang中github.com/cloudfoundry/cli/cf/api/apifakes.FakeServiceBrokerRepository类的典型用法代码示例。如果您正苦于以下问题:Golang FakeServiceBrokerRepository类的具体用法?Golang FakeServiceBrokerRepository怎么用?Golang FakeServiceBrokerRepository使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FakeServiceBrokerRepository类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1:
"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 coreconfig.Repository
brokerRepo *apifakes.FakeServiceBrokerRepository
requirementsFactory *testreq.FakeReqFactory
deps commandregistry.Dependency
)
updateCommandDependency := func(pluginCall bool) {
deps.UI = ui
deps.RepoLocator = deps.RepoLocator.SetServiceBrokerRepository(brokerRepo)
deps.Config = configRepo
commandregistry.Commands.SetCommand(commandregistry.Commands.FindCommand("delete-service-broker").SetDependency(deps, pluginCall))
}
BeforeEach(func() {
ui = &testterm.FakeUI{Inputs: []string{"y"}}
brokerRepo = new(apifakes.FakeServiceBrokerRepository)
configRepo = testconfig.NewRepositoryWithDefaults()
示例2:
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 coreconfig.Repository
serviceBrokerRepo *apifakes.FakeServiceBrokerRepository
cmd commandregistry.Command
deps commandregistry.Dependency
factory *requirementsfakes.FakeFactory
flagContext flags.FlagContext
loginRequirement requirements.Requirement
targetedSpaceRequirement requirements.Requirement
minAPIVersionRequirement requirements.Requirement
)
BeforeEach(func() {
ui = &testterm.FakeUI{}
configRepo = testconfig.NewRepositoryWithDefaults()
serviceBrokerRepo = new(apifakes.FakeServiceBrokerRepository)
repoLocator := deps.RepoLocator.SetServiceBrokerRepository(serviceBrokerRepo)
deps = commandregistry.Dependency{
UI: ui,
示例3:
"github.com/cloudfoundry/cli/cf/actors/servicebuilder/servicebuilderfakes"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("Broker Builder", func() {
var (
brokerBuilder brokerbuilder.BrokerBuilder
serviceBuilder *servicebuilderfakes.FakeServiceBuilder
brokerRepo *apifakes.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 = new(apifakes.FakeServiceBrokerRepository)
serviceBuilder = new(servicebuilderfakes.FakeServiceBuilder)
brokerBuilder = brokerbuilder.NewBuilder(brokerRepo, serviceBuilder)
serviceBroker1 = models.ServiceBroker{GUID: "my-service-broker-guid", Name: "my-service-broker"}
示例4:
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/cf/commands/servicebroker"
. "github.com/cloudfoundry/cli/testhelpers/matchers"
)
var _ = Describe("service-brokers command", func() {
var (
ui *testterm.FakeUI
config coreconfig.Repository
repo *apifakes.FakeServiceBrokerRepository
requirementsFactory *testreq.FakeReqFactory
deps commandregistry.Dependency
)
updateCommandDependency := func(pluginCall bool) {
deps.UI = ui
deps.RepoLocator = deps.RepoLocator.SetServiceBrokerRepository(repo)
deps.Config = config
commandregistry.Commands.SetCommand(commandregistry.Commands.FindCommand("service-brokers").SetDependency(deps, pluginCall))
}
BeforeEach(func() {
ui = &testterm.FakeUI{}
config = testconfig.NewRepositoryWithDefaults()
repo = new(apifakes.FakeServiceBrokerRepository)
示例5:
"github.com/cloudfoundry/cli/cf/configuration/coreconfig"
"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 coreconfig.Repository
serviceBrokerRepo *apifakes.FakeServiceBrokerRepository
deps commandregistry.Dependency
)
updateCommandDependency := func(pluginCall bool) {
deps.UI = ui
deps.RepoLocator = deps.RepoLocator.SetServiceBrokerRepository(serviceBrokerRepo)
deps.Config = configRepo
commandregistry.Commands.SetCommand(commandregistry.Commands.FindCommand("rename-service-broker").SetDependency(deps, pluginCall))
}
BeforeEach(func() {
configRepo = testconfig.NewRepositoryWithDefaults()
ui = &testterm.FakeUI{}
示例6:
"github.com/cloudfoundry/cli/cf/requirements"
"github.com/cloudfoundry/cli/cf/requirements/requirementsfakes"
testcmd "github.com/cloudfoundry/cli/testhelpers/commands"
testconfig "github.com/cloudfoundry/cli/testhelpers/configuration"
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 *requirementsfakes.FakeFactory
configRepo coreconfig.Repository
serviceBrokerRepo *apifakes.FakeServiceBrokerRepository
deps commandregistry.Dependency
)
updateCommandDependency := func(pluginCall bool) {
deps.UI = ui
deps.RepoLocator = deps.RepoLocator.SetServiceBrokerRepository(serviceBrokerRepo)
deps.Config = configRepo
commandregistry.Commands.SetCommand(commandregistry.Commands.FindCommand("update-service-broker").SetDependency(deps, pluginCall))
}
BeforeEach(func() {
configRepo = testconfig.NewRepositoryWithDefaults()
ui = &testterm.FakeUI{}
requirementsFactory = new(requirementsfakes.FakeFactory)