root / trunk / Pithos.Network.Test / ObjectInfoTest.cs @ cfed7823
History | View | Annotate | Download (908 Bytes)
1 |
using System; |
---|---|
2 |
using System.Collections.Generic; |
3 |
using System.Linq; |
4 |
using System.Text; |
5 |
using NUnit.Framework; |
6 |
using Pithos.Interfaces; |
7 |
|
8 |
namespace Pithos.Network.Test |
9 |
{ |
10 |
[TestFixture] |
11 |
class ObjectInfoTest |
12 |
{ |
13 |
[Test] |
14 |
public void RelativeUrlToFilePath() |
15 |
{ |
16 |
|
17 |
var info1 = new ObjectInfo {Account = "pkanavos", Container = "pithos", Name = "somefolder/file1.txt"}; |
18 |
var path1=info1.RelativeUrlToFilePath("PKANAVOS"); |
19 |
Assert.AreEqual(@"somefolder\file1.txt",path1); |
20 |
var path2 = info1.RelativeUrlToFilePath("user1"); |
21 |
Assert.AreEqual(@"others\pkanavos\somefolder\file1.txt", path2); |
22 |
var info3 = new ObjectInfo { Account = "pkanavos", Name = "somefolder/file1.txt" }; |
23 |
var path3 = info1.RelativeUrlToFilePath("PKANAVOS"); |
24 |
Assert.AreEqual(@"somefolder\file1.txt", path1); |
25 |
|
26 |
} |
27 |
} |
28 |
} |