本文整理汇总了Golang中github.com/cloudfoundry/cli/cf/configuration/coreconfig/coreconfigfakes.FakeRepository类的典型用法代码示例。如果您正苦于以下问题:Golang FakeRepository类的具体用法?Golang FakeRepository怎么用?Golang FakeRepository使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FakeRepository类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1:
"github.com/cloudfoundry/cli/flags"
testterm "github.com/cloudfoundry/cli/testhelpers/terminal"
"github.com/cloudfoundry/cli/cf/commandregistry"
. "github.com/cloudfoundry/cli/testhelpers/matchers"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("set-space-quota command", func() {
var (
ui *testterm.FakeUI
spaceRepo *spacesfakes.FakeSpaceRepository
quotaRepo *spacequotasfakes.FakeSpaceQuotaRepository
requirementsFactory *requirementsfakes.FakeFactory
configRepo *coreconfigfakes.FakeRepository
deps commandregistry.Dependency
cmd spacequota.SetSpaceQuota
flagContext flags.FlagContext
loginReq requirements.Requirement
orgReq *requirementsfakes.FakeTargetedOrgRequirement
)
BeforeEach(func() {
requirementsFactory = new(requirementsfakes.FakeFactory)
loginReq = requirements.Passing{Type: "login"}
requirementsFactory.NewLoginRequirementReturns(loginReq)
orgReq = new(requirementsfakes.FakeTargetedOrgRequirement)
requirementsFactory.NewTargetedOrgRequirementReturns(orgReq)
ui = new(testterm.FakeUI)
开发者ID:Reejoshi,项目名称:cli,代码行数:32,代码来源:set_space_quota_test.go
示例2:
"github.com/cloudfoundry/cli/cf/commands/spacequota"
"github.com/cloudfoundry/cli/cf/flags"
. "github.com/cloudfoundry/cli/testhelpers/matchers"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("create-space-quota", func() {
var (
ui *testterm.FakeUI
quotaRepo *spacequotasfakes.FakeSpaceQuotaRepository
requirementsFactory *requirementsfakes.FakeFactory
config *coreconfigfakes.FakeRepository
loginReq *requirementsfakes.FakeRequirement
targetedOrgReq *requirementsfakes.FakeTargetedOrgRequirement
minApiVersionReq *requirementsfakes.FakeRequirement
reqFactory *requirementsfakes.FakeFactory
deps commandregistry.Dependency
cmd spacequota.CreateSpaceQuota
flagContext flags.FlagContext
)
BeforeEach(func() {
ui = &testterm.FakeUI{}
quotaRepo = new(spacequotasfakes.FakeSpaceQuotaRepository)
requirementsFactory = new(requirementsfakes.FakeFactory)
config = new(coreconfigfakes.FakeRepository)
repoLocator := api.RepositoryLocator{}
开发者ID:jasonkeene,项目名称:cli,代码行数:31,代码来源:create_space_quota_test.go
示例3:
. "github.com/cloudfoundry/cli/testhelpers/matchers"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
const TIMESTAMP_FORMAT = "2006-01-02T15:04:05.00-0700"
var _ = Describe("events command", func() {
var (
reqFactory *requirementsfakes.FakeFactory
eventsRepo *appeventsfakes.FakeAppEventsRepository
ui *testterm.FakeUI
config *coreconfigfakes.FakeRepository
deps commandregistry.Dependency
flagContext flags.FlagContext
loginRequirement requirements.Requirement
targetedSpaceRequirement requirements.Requirement
applicationRequirement *requirementsfakes.FakeApplicationRequirement
cmd *application.Events
)
BeforeEach(func() {
cmd = &application.Events{}
ui = new(testterm.FakeUI)
eventsRepo = new(appeventsfakes.FakeAppEventsRepository)
config = new(coreconfigfakes.FakeRepository)
config.OrganizationFieldsReturns(models.OrganizationFields{Name: "my-org"})
开发者ID:Reejoshi,项目名称:cli,代码行数:31,代码来源:events_test.go
注:本文中的github.com/cloudfoundry/cli/cf/configuration/coreconfig/coreconfigfakes.FakeRepository类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论