"github.com/cloudfoundry/cli/cf/actors/service_builder"
	testapi "github.com/cloudfoundry/cli/cf/api/fakes"

	"github.com/cloudfoundry/cli/cf/models"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = Describe("Service Builder", func() {
	var (
		planBuilder     *plan_builder_fakes.FakePlanBuilder
		serviceBuilder  service_builder.ServiceBuilder
		serviceRepo     *testapi.FakeServiceRepo
		service1        models.ServiceOffering
		service2        models.ServiceOffering
		v1Service       models.ServiceOffering
		planWithoutOrgs models.ServicePlanFields
		plan1           models.ServicePlanFields
		plan2           models.ServicePlanFields
		plan3           models.ServicePlanFields
	)

	BeforeEach(func() {
		serviceRepo = &testapi.FakeServiceRepo{}
		planBuilder = &plan_builder_fakes.FakePlanBuilder{}

		serviceBuilder = service_builder.NewBuilder(serviceRepo, planBuilder)
		service1 = models.ServiceOffering{
			ServiceOfferingFields: models.ServiceOfferingFields{
				Label:      "my-service1",
				Guid:       "service-guid1",
Beispiel #2
0
import (
	plan_builder_fakes "github.com/cloudfoundry/cli/cf/actors/plan_builder/fakes"
	"github.com/cloudfoundry/cli/cf/actors/service_builder"
	"github.com/cloudfoundry/cli/cf/api/fakes"
	"github.com/cloudfoundry/cli/cf/models"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = Describe("Service Builder", func() {
	var (
		planBuilder    *plan_builder_fakes.FakePlanBuilder
		serviceBuilder service_builder.ServiceBuilder
		serviceRepo    *fakes.FakeServiceRepo
		service1       models.ServiceOffering
		plan1          models.ServicePlanFields
		plan2          models.ServicePlanFields
	)

	BeforeEach(func() {
		serviceRepo = &fakes.FakeServiceRepo{}
		planBuilder = &plan_builder_fakes.FakePlanBuilder{}

		serviceBuilder = service_builder.NewBuilder(serviceRepo, planBuilder)
		service1 = models.ServiceOffering{
			ServiceOfferingFields: models.ServiceOfferingFields{
				Label:      "my-service1",
				Guid:       "service-guid1",
				BrokerGuid: "my-service-broker-guid1",
			},