github.com/makyo/juju@v0.0.0-20160425123129-2608902037e9/cmd/juju/subnet/export_test.go (about) 1 // Copyright 2015 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package subnet 5 6 import ( 7 "github.com/juju/cmd" 8 9 "github.com/juju/juju/cmd/modelcmd" 10 ) 11 12 type CreateCommand struct { 13 *createCommand 14 } 15 16 func NewCreateCommandForTest(api SubnetAPI) (cmd.Command, *CreateCommand) { 17 cmd := &createCommand{ 18 SubnetCommandBase: SubnetCommandBase{api: api}, 19 } 20 return modelcmd.Wrap(cmd), &CreateCommand{cmd} 21 } 22 23 type AddCommand struct { 24 *addCommand 25 } 26 27 func NewAddCommandForTest(api SubnetAPI) (cmd.Command, *AddCommand) { 28 cmd := &addCommand{ 29 SubnetCommandBase: SubnetCommandBase{api: api}, 30 } 31 return modelcmd.Wrap(cmd), &AddCommand{cmd} 32 } 33 34 type RemoveCommand struct { 35 *removeCommand 36 } 37 38 func NewRemoveCommandForTest(api SubnetAPI) (cmd.Command, *RemoveCommand) { 39 removeCmd := &removeCommand{ 40 SubnetCommandBase: SubnetCommandBase{api: api}, 41 } 42 return modelcmd.Wrap(removeCmd), &RemoveCommand{removeCmd} 43 } 44 45 type ListCommand struct { 46 *listCommand 47 } 48 49 func NewListCommandForTest(api SubnetAPI) (cmd.Command, *ListCommand) { 50 cmd := &listCommand{ 51 SubnetCommandBase: SubnetCommandBase{api: api}, 52 } 53 return modelcmd.Wrap(cmd), &ListCommand{cmd} 54 }