func NewBmsCommand(options cmds.Options, bmpClient clients.BmpClient) bmsCommand {
	consoleUi := common.NewConsoleUi(options.Verbose)

	return bmsCommand{
		options:   options,
		ui:        consoleUi,
		printer:   common.NewDefaultPrinter(consoleUi, options.Verbose),
		bmpClient: bmpClient,
	}
}
func NewFakeProvisioningBaremetalCommand(options cmds.Options, bmpClient clients.BmpClient, userInput string) provisioningBaremetalCommand {
	FakeUi := fakes.NewFakeUi()
	FakeUi.UserInput = userInput

	return provisioningBaremetalCommand{
		options:   options,
		ui:        FakeUi,
		printer:   common.NewDefaultPrinter(FakeUi, options.Verbose),
		bmpClient: bmpClient,
	}
}
func NewFakeUpdateStateCommand(options cmds.Options, bmpClient clients.BmpClient, userInput string) updateStateCommand {
	FakeUi := fakes.NewFakeUi()
	FakeUi.UserInput = userInput

	return updateStateCommand{
		options:   options,
		ui:        FakeUi,
		printer:   common.NewDefaultPrinter(FakeUi, options.Verbose),
		bmpClient: bmpClient,
	}
}
func NewProvisioningBaremetalCommand(options cmds.Options, bmpClient clients.BmpClient) provisioningBaremetalCommand {
	consoleUi := common.NewConsoleUi(options.Verbose)

	return provisioningBaremetalCommand{
		options: options,

		ui:        consoleUi,
		printer:   common.NewDefaultPrinter(consoleUi, options.Verbose),
		bmpClient: bmpClient,
	}
}
	fakes "github.com/cloudfoundry-community/bosh-softlayer-tools/common/fakes"
)

var _ = Describe("DefaultPrinter", func() {
	var (
		printer common.Printer
		fakeUi  *fakes.FakeUi
	)

	BeforeEach(func() {
		fakeUi = fakes.NewFakeUi()
	})

	Describe("when verbose is true", func() {
		BeforeEach(func() {
			printer = common.NewDefaultPrinter(fakeUi, true)
		})

		It("#Printf", func() {
			rc, err := printer.Printf("%s %s", "hello", "world")

			Expect(rc).To(Equal(0))
			Expect(err).ToNot(HaveOccurred())
			Expect(fakeUi.Output).To(ContainSubstring(fmt.Sprintf("%s %s", "hello", "world")))
		})

		It("#Println", func() {
			rc, err := printer.Println("hello")

			Expect(rc).To(Equal(0))
			Expect(err).ToNot(HaveOccurred())