本文整理匯總了Golang中github.com/cloudfoundry/cli/cf/api/stacks/stacksfakes.FakeStackRepository類的典型用法代碼示例。如果您正苦於以下問題:Golang FakeStackRepository類的具體用法?Golang FakeStackRepository怎麽用?Golang FakeStackRepository使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了FakeStackRepository類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1:
. "github.com/cloudfoundry/cli/testhelpers/matchers"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("CreateAppManifest", func() {
var (
ui *testterm.FakeUI
configRepo coreconfig.Repository
appSummaryRepo *apifakes.FakeAppSummaryRepository
stackRepo *stacksfakes.FakeStackRepository
cmd commandregistry.Command
deps commandregistry.Dependency
factory *requirementsfakes.FakeFactory
flagContext flags.FlagContext
loginRequirement requirements.Requirement
targetedSpaceRequirement requirements.Requirement
applicationRequirement *requirementsfakes.FakeApplicationRequirement
fakeManifest *manifestfakes.FakeApp
)
BeforeEach(func() {
ui = &testterm.FakeUI{}
configRepo = testconfig.NewRepositoryWithDefaults()
appSummaryRepo = new(apifakes.FakeAppSummaryRepository)
repoLocator := deps.RepoLocator.SetAppSummaryRepository(appSummaryRepo)
stackRepo = new(stacksfakes.FakeStackRepository)
示例2:
testreq "github.com/cloudfoundry/cli/testhelpers/requirements"
testterm "github.com/cloudfoundry/cli/testhelpers/terminal"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/cloudfoundry/cli/cf/commandregistry"
"github.com/cloudfoundry/cli/cf/configuration/coreconfig"
. "github.com/cloudfoundry/cli/testhelpers/matchers"
)
var _ = Describe("stack command", func() {
var (
ui *testterm.FakeUI
config coreconfig.Repository
repo *stacksfakes.FakeStackRepository
requirementsFactory *testreq.FakeReqFactory
deps commandregistry.Dependency
)
updateCommandDependency := func(pluginCall bool) {
deps.UI = ui
deps.Config = config
deps.RepoLocator = deps.RepoLocator.SetStackRepository(repo)
commandregistry.Commands.SetCommand(commandregistry.Commands.FindCommand("stack").SetDependency(deps, pluginCall))
}
BeforeEach(func() {
ui = &testterm.FakeUI{}
config = testconfig.NewRepositoryWithDefaults()
requirementsFactory = &testreq.FakeReqFactory{LoginSuccess: true}
示例3:
"github.com/cloudfoundry/cli/cf/requirements/requirementsfakes"
testcmd "github.com/cloudfoundry/cli/testhelpers/commands"
testconfig "github.com/cloudfoundry/cli/testhelpers/configuration"
testterm "github.com/cloudfoundry/cli/testhelpers/terminal"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/cloudfoundry/cli/cf/commands"
. "github.com/cloudfoundry/cli/testhelpers/matchers"
)
var _ = Describe("stacks command", func() {
var (
ui *testterm.FakeUI
repo *stacksfakes.FakeStackRepository
config coreconfig.Repository
requirementsFactory *requirementsfakes.FakeFactory
deps commandregistry.Dependency
)
updateCommandDependency := func(pluginCall bool) {
deps.UI = ui
deps.Config = config
deps.RepoLocator = deps.RepoLocator.SetStackRepository(repo)
commandregistry.Commands.SetCommand(commandregistry.Commands.FindCommand("stacks").SetDependency(deps, pluginCall))
}
BeforeEach(func() {
ui = &testterm.FakeUI{}
config = testconfig.NewRepositoryWithDefaults()
requirementsFactory = new(requirementsfakes.FakeFactory)
示例4:
. "github.com/cloudfoundry/cli/testhelpers/matchers"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("App", func() {
var (
ui *testterm.FakeUI
appSummaryRepo *apifakes.FakeAppSummaryRepository
appInstancesRepo *appinstancesfakes.FakeAppInstancesRepository
stackRepo *stacksfakes.FakeStackRepository
getAppModel *plugin_models.GetAppModel
cmd commandregistry.Command
deps commandregistry.Dependency
factory *requirementsfakes.FakeFactory
flagContext flags.FlagContext
loginRequirement requirements.Requirement
targetedSpaceRequirement requirements.Requirement
applicationRequirement *requirementsfakes.FakeApplicationRequirement
)
BeforeEach(func() {
cmd = &application.ShowApp{}
flagContext = flags.NewFlagContext(cmd.MetaData().Flags)
ui = &testterm.FakeUI{}
getAppModel = &plugin_models.GetAppModel{}