コード例 #1
0
	"github.com/cloudfoundry/cli/cf/errors"
	"github.com/cloudfoundry/cli/cf/net"

	testconfig "github.com/cloudfoundry/cli/testhelpers/configuration"
	testterm "github.com/cloudfoundry/cli/testhelpers/terminal"

	"github.com/onsi/gomega/ghttp"

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

var _ = Describe("RouteServiceBindingsRepository", func() {
	var (
		ccServer                *ghttp.Server
		configRepo              core_config.ReadWriter
		routeServiceBindingRepo api.CloudControllerRouteServiceBindingRepository
	)

	BeforeEach(func() {
		ccServer = ghttp.NewServer()
		configRepo = testconfig.NewRepositoryWithDefaults()
		configRepo.SetApiEndpoint(ccServer.URL())

		gateway := net.NewCloudControllerGateway(configRepo, time.Now, &testterm.FakeUI{})
		routeServiceBindingRepo = api.NewCloudControllerRouteServiceBindingRepository(configRepo, gateway)
	})

	AfterEach(func() {
		ccServer.Close()
	})
コード例 #2
0
	"github.com/cloudfoundry/cli/cf/errors"
	"github.com/cloudfoundry/cli/cf/net"

	testconfig "github.com/cloudfoundry/cli/testhelpers/configuration"
	testterm "github.com/cloudfoundry/cli/testhelpers/terminal"

	"github.com/onsi/gomega/ghttp"

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

var _ = Describe("RouteServiceBindingsRepository", func() {
	var (
		ccServer                *ghttp.Server
		configRepo              core_config.ReadWriter
		routeServiceBindingRepo api.CloudControllerRouteServiceBindingRepository
	)

	BeforeEach(func() {
		ccServer = ghttp.NewServer()
		configRepo = testconfig.NewRepositoryWithDefaults()
		configRepo.SetApiEndpoint(ccServer.URL())

		gateway := net.NewCloudControllerGateway(configRepo, time.Now, &testterm.FakeUI{})
		routeServiceBindingRepo = api.NewCloudControllerRouteServiceBindingRepository(configRepo, gateway)
	})

	AfterEach(func() {
		ccServer.Close()
	})