Ejemplo n.º 1
0
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)
}
Ejemplo n.º 2
0
func (deps *contextDeps) DownloadDirect(target internal.DownloadTarget, remote internal.ContentSource) error {
	return internal.Download(target, remote)
}