github.com/makyo/juju@v0.0.0-20160425123129-2608902037e9/api/reboot/export_test.go (about) 1 package reboot 2 3 import ( 4 "github.com/juju/juju/api/base/testing" 5 ) 6 7 // PatchFacadeCall patches the State's facade such that 8 // FacadeCall method calls are diverted to the provided 9 // function. 10 func PatchFacadeCall(p testing.Patcher, st State, f func(request string, params, response interface{}) error) { 11 st0 := st.(*state) // *state is the only implementation of State. 12 testing.PatchFacadeCall(p, &st0.facade, f) 13 }