本文整理汇总了Golang中github.com/cloudfoundry/cli/cf/command_registry.Dependency.Ui方法的典型用法代码示例。如果您正苦于以下问题:Golang Dependency.Ui方法的具体用法?Golang Dependency.Ui怎么用?Golang Dependency.Ui使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/cloudfoundry/cli/cf/command_registry.Dependency
的用法示例。
在下文中一共展示了Dependency.Ui方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1:
)
var _ = Describe("app Command", func() {
var (
ui *testterm.FakeUI
configRepo core_config.Repository
appSummaryRepo *testapi.FakeAppSummaryRepo
appInstancesRepo *testAppInstanaces.FakeAppInstancesRepository
appLogsNoaaRepo *testapi.FakeLogsNoaaRepository
requirementsFactory *testreq.FakeReqFactory
app models.Application
deps command_registry.Dependency
)
updateCommandDependency := func(pluginCall bool) {
deps.Ui = ui
deps.RepoLocator = deps.RepoLocator.SetLogsNoaaRepository(appLogsNoaaRepo)
deps.Config = configRepo
deps.RepoLocator = deps.RepoLocator.SetAppSummaryRepository(appSummaryRepo)
deps.RepoLocator = deps.RepoLocator.SetAppInstancesRepository(appInstancesRepo)
command_registry.Commands.SetCommand(command_registry.Commands.FindCommand("app").SetDependency(deps, pluginCall))
}
BeforeEach(func() {
ui = &testterm.FakeUI{}
appSummaryRepo = &testapi.FakeAppSummaryRepo{}
appLogsNoaaRepo = &testapi.FakeLogsNoaaRepository{}
appInstancesRepo = &testAppInstanaces.FakeAppInstancesRepository{}
configRepo = testconfig.NewRepositoryWithDefaults()
requirementsFactory = &testreq.FakeReqFactory{
LoginSuccess: true,