Exemplo n.º 1
0
	)

	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",
			},
		}

		serviceRepo.FindServiceOfferingByLabelName = "my-service1"
		serviceRepo.FindServiceOfferingByLabelServiceOffering = service1

		serviceRepo.GetServiceOfferingByGuidReturns = struct {
			ServiceOffering models.ServiceOffering
			Error           error
		}{
			service1,
			nil,
		}

		serviceRepo.ListServicesFromBrokerReturns = map[string][]models.ServiceOffering{
			"my-service-broker-guid1": []models.ServiceOffering{service1},
		}

		plan1 = models.ServicePlanFields{