本文整理汇总了Golang中github.com/cloudfoundry/cli/cf/api/fakes.FakeServiceBrokerRepo类的典型用法代码示例。如果您正苦于以下问题:Golang FakeServiceBrokerRepo类的具体用法?Golang FakeServiceBrokerRepo怎么用?Golang FakeServiceBrokerRepo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FakeServiceBrokerRepo类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1:
"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"
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.ReadWriter
serviceBrokerRepo *testapi.FakeServiceBrokerRepo
)
BeforeEach(func() {
configRepo = testconfig.NewRepositoryWithDefaults()
ui = &testterm.FakeUI{}
requirementsFactory = &testreq.FakeReqFactory{}
serviceBrokerRepo = &testapi.FakeServiceBrokerRepo{}
})
runCommand := func(args ...string) bool {
return testcmd.RunCommand(NewUpdateServiceBroker(ui, configRepo, serviceBrokerRepo), args, requirementsFactory)
}
开发者ID:tools-alexuser01,项目名称:cli,代码行数:31,代码来源:update_service_broker_test.go
示例2:
package actors_test
import (
"github.com/cloudfoundry/cli/cf/actors"
"github.com/cloudfoundry/cli/cf/api/fakes"
"github.com/cloudfoundry/cli/cf/models"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("Services", func() {
var (
actor actors.ServiceActor
brokerRepo *fakes.FakeServiceBrokerRepo
serviceRepo *fakes.FakeServiceRepo
servicePlanRepo *fakes.FakeServicePlanRepo
servicePlanVisibilityRepo *fakes.FakeServicePlanVisibilityRepository
orgRepo *fakes.FakeOrgRepository
)
BeforeEach(func() {
brokerRepo = &fakes.FakeServiceBrokerRepo{}
serviceRepo = &fakes.FakeServiceRepo{}
servicePlanRepo = &fakes.FakeServicePlanRepo{}
servicePlanVisibilityRepo = &fakes.FakeServicePlanVisibilityRepository{}
orgRepo = &fakes.FakeOrgRepository{}
actor = actors.NewServiceHandler(brokerRepo, serviceRepo, servicePlanRepo, servicePlanVisibilityRepo, orgRepo)
serviceBroker1 := models.ServiceBroker{Guid: "my-service-broker-guid", Name: "my-service-broker"}
serviceBroker2 := models.ServiceBroker{Guid: "my-service-broker-guid2", Name: "my-service-broker2"}
开发者ID:EthanWu,项目名称:cli,代码行数:32,代码来源:services_test.go
示例3:
. "github.com/cloudfoundry/cli/cf/commands/servicebroker"
"github.com/cloudfoundry/cli/cf/configuration"
"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 configuration.ReadWriter
brokerRepo *testapi.FakeServiceBrokerRepo
requirementsFactory *testreq.FakeReqFactory
)
BeforeEach(func() {
ui = &testterm.FakeUI{Inputs: []string{"y"}}
brokerRepo = &testapi.FakeServiceBrokerRepo{}
configRepo = testconfig.NewRepositoryWithDefaults()
requirementsFactory = &testreq.FakeReqFactory{LoginSuccess: true}
})
runCommand := func(args ...string) {
cmd := NewDeleteServiceBroker(ui, configRepo, brokerRepo)
testcmd.RunCommand(cmd, args, requirementsFactory)
}
开发者ID:hail100,项目名称:cli,代码行数:31,代码来源:delete_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.FakeServiceBrokerRepo
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.FakeServiceBrokerRepo{}
serviceBuilder = &fake_service_builder.FakeServiceBuilder{}
brokerBuilder = broker_builder.NewBuilder(brokerRepo, serviceBuilder)
serviceBroker1 = models.ServiceBroker{Guid: "my-service-broker-guid", Name: "my-service-broker"}
开发者ID:vframbach,项目名称:cli,代码行数:29,代码来源:broker_builder_test.go
示例5:
import (
"github.com/cloudfoundry/cli/cf/actors"
"github.com/cloudfoundry/cli/cf/api/fakes"
"github.com/cloudfoundry/cli/cf/models"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("Services", func() {
var (
actor actors.ServiceActor
brokerRepo *fakes.FakeServiceBrokerRepo
serviceRepo *fakes.FakeServiceRepo
servicePlanRepo *fakes.FakeServicePlanRepo
servicePlanVisibilityRepo *fakes.FakeServicePlanVisibilityRepository
orgRepo *fakes.FakeOrgRepository
serviceBroker1 models.ServiceBroker
serviceBroker2 models.ServiceBroker
)
BeforeEach(func() {
brokerRepo = &fakes.FakeServiceBrokerRepo{}
serviceRepo = &fakes.FakeServiceRepo{}
servicePlanRepo = &fakes.FakeServicePlanRepo{}
servicePlanVisibilityRepo = &fakes.FakeServicePlanVisibilityRepository{}
orgRepo = &fakes.FakeOrgRepository{}
actor = actors.NewServiceHandler(brokerRepo, serviceRepo, servicePlanRepo, servicePlanVisibilityRepo, orgRepo)
serviceBroker1 = models.ServiceBroker{Guid: "my-service-broker-guid", Name: "my-service-broker"}
开发者ID:BlueSpice,项目名称:cli,代码行数:31,代码来源:services_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.FakeServiceBrokerRepo
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.FakeServiceBrokerRepo{}
开发者ID:vframbach,项目名称:cli,代码行数:31,代码来源:service_brokers_test.go
示例7:
package actors_test
import (
"github.com/cloudfoundry/cli/cf/actors"
"github.com/cloudfoundry/cli/cf/api/fakes"
"github.com/cloudfoundry/cli/cf/models"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("Services", func() {
var (
actor actors.ServiceActor
brokerRepo *fakes.FakeServiceBrokerRepo
serviceRepo *fakes.FakeServiceRepo
servicePlanRepo *fakes.FakeServicePlanRepo
servicePlanVisibilityRepo *fakes.FakeServicePlanVisibilityRepository
orgRepo *fakes.FakeOrgRepository
)
BeforeEach(func() {
brokerRepo = &fakes.FakeServiceBrokerRepo{}
serviceRepo = &fakes.FakeServiceRepo{}
servicePlanRepo = &fakes.FakeServicePlanRepo{}
servicePlanVisibilityRepo = &fakes.FakeServicePlanVisibilityRepository{}
orgRepo = &fakes.FakeOrgRepository{}
actor = actors.NewServiceHandler(brokerRepo, serviceRepo, servicePlanRepo, servicePlanVisibilityRepo, orgRepo)
})
Describe("Get Brokers with Dependencies", func() {
开发者ID:jpalermo,项目名称:cli,代码行数:32,代码来源:services_test.go
注:本文中的github.com/cloudfoundry/cli/cf/api/fakes.FakeServiceBrokerRepo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论