本文整理汇总了Golang中github.com/cloudfoundry/cli/cf/actors.ServiceActor类的典型用法代码示例。如果您正苦于以下问题:Golang ServiceActor类的具体用法?Golang ServiceActor怎么用?Golang ServiceActor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ServiceActor类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1:
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
示例2:
"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",
开发者ID:Reejoshi,项目名称:cli,代码行数:32,代码来源:services_test.go
示例3:
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/actors.ServiceActor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论