"time"

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

	"code.cloudfoundry.org/garden"
	. "code.cloudfoundry.org/garden/client"
	"code.cloudfoundry.org/garden/client/connection/connectionfakes"
	"code.cloudfoundry.org/garden/gardenfakes"
)

var _ = Describe("Container", func() {
	var container garden.Container

	var fakeConnection *connectionfakes.FakeConnection

	BeforeEach(func() {
		fakeConnection = new(connectionfakes.FakeConnection)
	})

	JustBeforeEach(func() {
		var err error

		client := New(fakeConnection)

		fakeConnection.CreateReturns("some-handle", nil)

		container, err = client.Create(garden.ContainerSpec{})
		Ω(err).ShouldNot(HaveOccurred())
	})
import (
	"errors"

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

	"code.cloudfoundry.org/garden"
	. "code.cloudfoundry.org/garden/client"
	fakes "code.cloudfoundry.org/garden/client/connection/connectionfakes"
)

var _ = Describe("Client", func() {
	var client Client

	var fakeConnection *fakes.FakeConnection

	BeforeEach(func() {
		fakeConnection = new(fakes.FakeConnection)
	})

	JustBeforeEach(func() {
		client = New(fakeConnection)
	})

	Describe("Capacity", func() {
		BeforeEach(func() {
			fakeConnection.CapacityReturns(
				garden.Capacity{
					MemoryInBytes: 1111,
					DiskInBytes:   2222,