Пример #1
0
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() {
Пример #2
0
	"github.com/cloudfoundry/cli/cf/actors/planbuilder"
	"github.com/cloudfoundry/cli/cf/api/apifakes"
	"github.com/cloudfoundry/cli/cf/api/organizations/organizationsfakes"
	"github.com/cloudfoundry/cli/cf/models"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = Describe("Plan builder", func() {
	var (
		builder planbuilder.PlanBuilder

		planRepo       *apifakes.OldFakeServicePlanRepo
		visibilityRepo *apifakes.FakeServicePlanVisibilityRepository
		orgRepo        *organizationsfakes.FakeOrganizationRepository

		plan1 models.ServicePlanFields
		plan2 models.ServicePlanFields

		org1 models.Organization
		org2 models.Organization
	)

	BeforeEach(func() {
		planbuilder.PlanToOrgsVisibilityMap = nil
		planbuilder.OrgToPlansVisibilityMap = nil
		planRepo = new(apifakes.OldFakeServicePlanRepo)
		visibilityRepo = new(apifakes.FakeServicePlanVisibilityRepository)
		orgRepo = new(organizationsfakes.FakeOrganizationRepository)
		builder = planbuilder.NewBuilder(planRepo, visibilityRepo, orgRepo)