github.com/sleungcy-sap/cli@v7.1.0+incompatible/cf/commandregistry/dependency_test.go (about)

     1  package commandregistry_test
     2  
     3  import (
     4  	"code.cloudfoundry.org/cli/cf/commandregistry"
     5  	"code.cloudfoundry.org/cli/cf/trace/tracefakes"
     6  
     7  	"os"
     8  
     9  	. "github.com/onsi/ginkgo"
    10  	. "github.com/onsi/gomega"
    11  )
    12  
    13  var _ = Describe("Dependency", func() {
    14  	var dependency commandregistry.Dependency
    15  
    16  	It("populates all fields by calling all the dependency contructors", func() {
    17  		fakeLogger := new(tracefakes.FakePrinter)
    18  		dependency = commandregistry.NewDependency(os.Stdout, fakeLogger, "")
    19  
    20  		Expect(dependency.UI).ToNot(BeNil())
    21  		Expect(dependency.Config).ToNot(BeNil())
    22  		Expect(dependency.RepoLocator).ToNot(BeNil())
    23  		Expect(dependency.PluginConfig).ToNot(BeNil())
    24  		Expect(dependency.ManifestRepo).ToNot(BeNil())
    25  		Expect(dependency.AppManifest).ToNot(BeNil())
    26  		Expect(dependency.Gateways).ToNot(BeNil())
    27  		Expect(dependency.TeePrinter).ToNot(BeNil())
    28  		Expect(dependency.PluginRepo).ToNot(BeNil())
    29  		Expect(dependency.PluginModels).ToNot(BeNil())
    30  		Expect(dependency.ServiceBuilder).ToNot(BeNil())
    31  		Expect(dependency.BrokerBuilder).ToNot(BeNil())
    32  		Expect(dependency.PlanBuilder).ToNot(BeNil())
    33  		Expect(dependency.ServiceHandler).ToNot(BeNil())
    34  		Expect(dependency.ServicePlanHandler).ToNot(BeNil())
    35  		Expect(dependency.WordGenerator).ToNot(BeNil())
    36  		Expect(dependency.AppZipper).ToNot(BeNil())
    37  		Expect(dependency.AppFiles).ToNot(BeNil())
    38  		Expect(dependency.PushActor).ToNot(BeNil())
    39  		Expect(dependency.ChecksumUtil).ToNot(BeNil())
    40  	})
    41  })