github.com/rakutentech/cli@v6.12.5-0.20151006231303-24468b65536e+incompatible/testhelpers/commands/fake_app_displayer.go (about) 1 package commands 2 3 import ( 4 "github.com/cloudfoundry/cli/cf/command_registry" 5 "github.com/cloudfoundry/cli/cf/models" 6 "github.com/cloudfoundry/cli/cf/requirements" 7 "github.com/cloudfoundry/cli/flags" 8 ) 9 10 type FakeAppDisplayer struct { 11 AppToDisplay models.Application 12 OrgName string 13 SpaceName string 14 } 15 16 func (displayer *FakeAppDisplayer) ShowApp(app models.Application, orgName, spaceName string) { 17 displayer.AppToDisplay = app 18 } 19 20 func (cmd *FakeAppDisplayer) MetaData() command_registry.CommandMetadata { 21 return command_registry.CommandMetadata{Name: "app"} 22 } 23 24 func (cmd *FakeAppDisplayer) SetDependency(_ command_registry.Dependency, _ bool) command_registry.Command { 25 return cmd 26 } 27 28 func (cmd *FakeAppDisplayer) Requirements(_ requirements.Factory, _ flags.FlagContext) (reqs []requirements.Requirement, err error) { 29 return 30 } 31 32 func (cmd *FakeAppDisplayer) Execute(_ flags.FlagContext) {}