Extracted upload/download functionality from NetworkAgent to Uploader.cs and Download...
[pithos-ms-client] / trunk / Pithos.Core.Test / NetworkAgentTest.cs
index fb8838c..d84fdcb 100644 (file)
@@ -55,7 +55,8 @@ namespace Pithos.Core.Test
             var cloudFile = new ObjectInfo {Account = account, Container = "pithos"};
             var fileInfo = new FileInfo(filePath);
 
-            agent.UploadWithHashMap(accountInfo,cloudFile,fileInfo,fileName,treeHash);
+            var uploader = new Uploader();
+            uploader.UploadWithHashMap(accountInfo,cloudFile,fileInfo,fileName,treeHash);
             
             var newHash = await client.GetHashMap(null, FolderConstants.PithosContainer, fileName);
 
@@ -91,7 +92,8 @@ namespace Pithos.Core.Test
             var cloudFile = new ObjectInfo {Account = account, Container = FolderConstants.PithosContainer};
 
             var newHash = client.GetHashMap(null, FolderConstants.PithosContainer, fileName).Result;
-            agent.DownloadWithBlocks(accountInfo, client, cloudFile, new Uri(fileName, UriKind.Relative), filePath, newHash)
+            var downloader = new Downloader();
+            downloader.DownloadWithBlocks(accountInfo, client, cloudFile, new Uri(fileName, UriKind.Relative), filePath, newHash)
                 .Wait();
 
             Assert.IsTrue(File.Exists(filePath));