コード例 #1
0
ファイル: api_test.go プロジェクト: dmikusa-pivotal/gopivnet
	"errors"
	"io/ioutil"
	"net/http"
	"os"

	pivnetapi "github.com/cfmobile/gopivnet/api"
	"github.com/cfmobile/gopivnet/resource"
	"github.com/cfmobile/gopivnet/resource/fakes"

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

var _ = Describe("Api", func() {
	var api *pivnetapi.PivnetApi
	var requester *fakes.FakeReleaseRequester
	var prod *resource.Product
	var productFiles *resource.ProductFiles

	BeforeEach(func() {
		prod = &resource.Product{
			Releases: []resource.Release{
				resource.Release{
					Id:      2,
					Version: "2.0",
				},
				resource.Release{
					Id:      1,
					Version: "1.0",
				},
コード例 #2
0
ファイル: api_test.go プロジェクト: cfmobile/gopivnet
	"errors"
	"io/ioutil"
	"net/http"
	"os"

	pivnetapi "github.com/cfmobile/gopivnet/api"
	"github.com/cfmobile/gopivnet/resource"
	"github.com/cfmobile/gopivnet/resource/fakes"

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

var _ = Describe("Api", func() {
	var api *pivnetapi.PivnetApi
	var requester *fakes.FakeReleaseRequester
	var prod *resource.Product
	var productFiles *resource.ProductFiles

	BeforeEach(func() {
		prod = &resource.Product{
			Releases: []resource.Release{
				resource.Release{
					Id:      2,
					Version: "2.0",
				},
				resource.Release{
					Id:      1,
					Version: "1.0",
				},