本文整理汇总了Golang中github.com/cloudfoundry/cli/cf/actors/servicebuilder/servicebuilderfakes.FakeServiceBuilder类的典型用法代码示例。如果您正苦于以下问题:Golang FakeServiceBuilder类的具体用法?Golang FakeServiceBuilder怎么用?Golang FakeServiceBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FakeServiceBuilder类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1:
"github.com/cloudfoundry/cli/cf/actors"
"github.com/cloudfoundry/cli/cf/actors/brokerbuilder/brokerbuilderfakes"
"github.com/cloudfoundry/cli/cf/actors/servicebuilder/servicebuilderfakes"
"github.com/cloudfoundry/cli/cf/api/organizations/organizationsfakes"
"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 *brokerbuilderfakes.FakeBrokerBuilder
serviceBuilder *servicebuilderfakes.FakeServiceBuilder
orgRepo *organizationsfakes.FakeOrganizationRepository
serviceBroker1 models.ServiceBroker
service1 models.ServiceOffering
)
BeforeEach(func() {
orgRepo = new(organizationsfakes.FakeOrganizationRepository)
brokerBuilder = new(brokerbuilderfakes.FakeBrokerBuilder)
serviceBuilder = new(servicebuilderfakes.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",
示例2:
var _ = Describe("Service Plans", func() {
var (
actor actors.ServicePlanActor
servicePlanRepo *apifakes.OldFakeServicePlanRepo
servicePlanVisibilityRepo *apifakes.FakeServicePlanVisibilityRepository
orgRepo *organizationsfakes.FakeOrganizationRepository
planBuilder *planbuilderfakes.FakePlanBuilder
serviceBuilder *servicebuilderfakes.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() {
示例3:
"github.com/cloudfoundry/cli/cf/commandregistry"
. "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 coreconfig.Repository
requirementsFactory *requirementsfakes.FakeFactory
serviceRepo *apifakes.FakeServiceRepository
serviceBuilder *servicebuilderfakes.FakeServiceBuilder
offering1 models.ServiceOffering
offering2 models.ServiceOffering
deps commandregistry.Dependency
)
updateCommandDependency := func(pluginCall bool) {
deps.UI = ui
deps.Config = config
deps.RepoLocator = deps.RepoLocator.SetServiceRepository(serviceRepo)
deps.ServiceBuilder = serviceBuilder
commandregistry.Commands.SetCommand(commandregistry.Commands.FindCommand("create-service").SetDependency(deps, pluginCall))
}
BeforeEach(func() {
示例4:
"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"}
示例5:
"github.com/cloudfoundry/cli/flags"
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/cf/commands/service"
. "github.com/cloudfoundry/cli/testhelpers/matchers"
)
var _ = Describe("marketplace command", func() {
var ui *testterm.FakeUI
var requirementsFactory *requirementsfakes.FakeFactory
var config coreconfig.Repository
var serviceBuilder *servicebuilderfakes.FakeServiceBuilder
var fakeServiceOfferings []models.ServiceOffering
var serviceWithAPaidPlan models.ServiceOffering
var service2 models.ServiceOffering
var deps commandregistry.Dependency
updateCommandDependency := func(pluginCall bool) {
deps.UI = ui
deps.Config = config
deps.ServiceBuilder = serviceBuilder
commandregistry.Commands.SetCommand(commandregistry.Commands.FindCommand("marketplace").SetDependency(deps, pluginCall))
}
BeforeEach(func() {
serviceBuilder = new(servicebuilderfakes.FakeServiceBuilder)
ui = &testterm.FakeUI{}