1package fakes 2 3import "github.com/cloudfoundry/bosh-bootloader/storage" 4 5type Command struct { 6 CheckFastFailsCall struct { 7 CallCount int 8 Receives struct { 9 State storage.State 10 SubcommandFlags []string 11 } 12 Returns struct { 13 Error error 14 } 15 } 16 ExecuteCall struct { 17 CallCount int 18 PassState bool 19 Receives struct { 20 State storage.State 21 SubcommandFlags []string 22 } 23 Returns struct { 24 Error error 25 } 26 } 27 UsageCall struct { 28 CallCount int 29 Returns struct { 30 Usage string 31 } 32 } 33} 34 35func (c *Command) CheckFastFails(subcommandFlags []string, state storage.State) error { 36 c.CheckFastFailsCall.CallCount++ 37 c.CheckFastFailsCall.Receives.State = state 38 c.CheckFastFailsCall.Receives.SubcommandFlags = subcommandFlags 39 40 return c.CheckFastFailsCall.Returns.Error 41} 42 43func (c *Command) Execute(subcommandFlags []string, state storage.State) error { 44 c.ExecuteCall.CallCount++ 45 c.ExecuteCall.Receives.State = state 46 c.ExecuteCall.Receives.SubcommandFlags = subcommandFlags 47 48 return c.ExecuteCall.Returns.Error 49} 50 51func (c *Command) Usage() string { 52 c.UsageCall.CallCount++ 53 return c.UsageCall.Returns.Usage 54} 55