root / trunk / Pithos.Network.Test / CloudFilesClientTest.cs @ a27aa447
History | View | Annotate | Download (950 Bytes)
1 |
using System; |
---|---|
2 |
using System.Collections.Generic; |
3 |
using System.IO; |
4 |
using System.Linq; |
5 |
using System.Text; |
6 |
using NUnit.Framework; |
7 |
|
8 |
namespace Pithos.Network.Test |
9 |
{ |
10 |
[TestFixture] |
11 |
class CloudFilesClientTest |
12 |
{ |
13 |
[Test] |
14 |
public void TestPutHashMap() |
15 |
{ |
16 |
var client = new CloudFilesClient |
17 |
{ |
18 |
AuthenticationUrl = @"https://pithos.dev.grnet.gr", |
19 |
UsePithos = true |
20 |
}; |
21 |
client.Authenticate("890329@vho.grnet.gr", "24989dce4e0fcb072f8cb60c8922be19"); |
22 |
var fileName = @"vlc-1.1.11-win32.exe"; |
23 |
var treeHash=Signature.CalculateTreeHashAsync(Path.Combine(@"e:\pithos\" ,fileName), 4*1024*1024 , "sha256").Result; |
24 |
var result=client.PutHashMap("pithos", fileName, treeHash).Result; |
25 |
|
26 |
Assert.AreEqual(0,result.Count); |
27 |
} |
28 |
|
29 |
|
30 |
|
31 |
} |
32 |
} |