本文整理汇总了Golang中github.com/cloudfoundry/cli/cf/actors/service_builder/fakes.FakeServiceBuilder类的典型用法代码示例。如果您正苦于以下问题:Golang FakeServiceBuilder类的具体用法?Golang FakeServiceBuilder怎么用?Golang FakeServiceBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FakeServiceBuilder类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1:
var _ = Describe("Service Plans", func() {
var (
actor actors.ServicePlanActor
servicePlanRepo *testapi.FakeServicePlanRepo
servicePlanVisibilityRepo *testapi.FakeServicePlanVisibilityRepository
orgRepo *fake_orgs.FakeOrganizationRepository
planBuilder *fake_plan_builder.FakePlanBuilder
serviceBuilder *fake_service_builder.FakeServiceBuilder
privateServicePlanVisibilityFields models.ServicePlanVisibilityFields
publicServicePlanVisibilityFields models.ServicePlanVisibilityFields
limitedServicePlanVisibilityFields models.ServicePlanVisibilityFields
publicServicePlan models.ServicePlanFields
privateServicePlan models.ServicePlanFields
limitedServicePlan models.ServicePlanFields
publicService models.ServiceOffering
mixedService models.ServiceOffering
privateService models.ServiceOffering
publicAndLimitedService models.ServiceOffering
org1 models.Organization
org2 models.Organization
visibility1 models.ServicePlanVisibilityFields
)
BeforeEach(func() {
开发者ID:vframbach,项目名称:cli,代码行数:31,代码来源:services_plans_test.go
示例2:
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
示例3:
"github.com/cloudfoundry/cli/cf/command_registry"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/cloudfoundry/cli/testhelpers/matchers"
)
var _ = Describe("create-service command", func() {
var (
ui *testterm.FakeUI
config core_config.Repository
requirementsFactory *testreq.FakeReqFactory
serviceRepo *testapi.FakeServiceRepository
serviceBuilder *fakes.FakeServiceBuilder
offering1 models.ServiceOffering
offering2 models.ServiceOffering
deps command_registry.Dependency
)
updateCommandDependency := func(pluginCall bool) {
deps.Ui = ui
deps.Config = config
deps.RepoLocator = deps.RepoLocator.SetServiceRepository(serviceRepo)
deps.ServiceBuilder = serviceBuilder
command_registry.Commands.SetCommand(command_registry.Commands.FindCommand("create-service").SetDependency(deps, pluginCall))
}
BeforeEach(func() {
开发者ID:vframbach,项目名称:cli,代码行数:30,代码来源:create_service_test.go
示例4:
"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("marketplace command", func() {
var ui *testterm.FakeUI
var requirementsFactory *testreq.FakeReqFactory
var config core_config.Repository
var serviceBuilder *testapi.FakeServiceBuilder
var fakeServiceOfferings []models.ServiceOffering
var serviceWithAPaidPlan models.ServiceOffering
var service2 models.ServiceOffering
var deps command_registry.Dependency
updateCommandDependency := func(pluginCall bool) {
deps.Ui = ui
deps.Config = config
deps.ServiceBuilder = serviceBuilder
command_registry.Commands.SetCommand(command_registry.Commands.FindCommand("marketplace").SetDependency(deps, pluginCall))
}
BeforeEach(func() {
serviceBuilder = &testapi.FakeServiceBuilder{}
ui = &testterm.FakeUI{}
开发者ID:vframbach,项目名称:cli,代码行数:31,代码来源:marketplace_test.go
示例5:
"github.com/cloudfoundry/cli/cf/actors"
broker_builder "github.com/cloudfoundry/cli/cf/actors/broker_builder/fakes"
service_builder "github.com/cloudfoundry/cli/cf/actors/service_builder/fakes"
organization_fakes "github.com/cloudfoundry/cli/cf/api/organizations/fakes"
"github.com/cloudfoundry/cli/cf/errors"
"github.com/cloudfoundry/cli/cf/models"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("Services", func() {
var (
actor actors.ServiceActor
brokerBuilder *broker_builder.FakeBrokerBuilder
serviceBuilder *service_builder.FakeServiceBuilder
orgRepo *organization_fakes.FakeOrganizationRepository
serviceBroker1 models.ServiceBroker
service1 models.ServiceOffering
)
BeforeEach(func() {
orgRepo = &organization_fakes.FakeOrganizationRepository{}
brokerBuilder = &broker_builder.FakeBrokerBuilder{}
serviceBuilder = &service_builder.FakeServiceBuilder{}
actor = actors.NewServiceHandler(orgRepo, brokerBuilder, serviceBuilder)
serviceBroker1 = models.ServiceBroker{Guid: "my-service-broker-guid1", Name: "my-service-broker1"}
service1 = models.ServiceOffering{ServiceOfferingFields: models.ServiceOfferingFields{
Label: "my-service1",
开发者ID:vframbach,项目名称:cli,代码行数:32,代码来源:services_test.go
注:本文中的github.com/cloudfoundry/cli/cf/actors/service_builder/fakes.FakeServiceBuilder类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论