func (s *DownloadSuite) TestDownload(c *gc.C) { stub := &stubDownload{ internalStub: s.stub, } target := stub remote := stub err := internal.Download(target, remote) c.Assert(err, jc.ErrorIsNil) s.stub.CheckCallNames(c, "Initialize", "Write") s.stub.CheckCall(c, 1, "Write", remote) }
func (deps *contextDeps) DownloadDirect(target internal.DownloadTarget, remote internal.ContentSource) error { return internal.Download(target, remote) }