1.1.4
by Iain Lane
Import upstream version 0.8.1.3+dfsg |
1 |
using Google.GData.Photos; |
2 |
using NUnit.Framework; |
|
3 |
using Google.GData.Client.UnitTests; |
|
4 |
namespace Google.GData.Client.UnitTests.Picasa |
|
5 |
{
|
|
6 |
||
7 |
||
8 |
/// <summary>
|
|
9 |
///This is a test class for TagAccessorTest and is intended
|
|
10 |
///to contain all TagAccessorTest Unit Tests
|
|
11 |
///</summary>
|
|
12 |
[TestFixture][Category("Picasa")] |
|
13 |
public class TagAccessorTest |
|
14 |
{
|
|
15 |
||
16 |
||
17 |
private TestContext testContextInstance; |
|
18 |
||
19 |
/// <summary>
|
|
20 |
///Gets or sets the test context which provides
|
|
21 |
///information about and functionality for the current test run.
|
|
22 |
///</summary>
|
|
23 |
public TestContext TestContext |
|
24 |
{
|
|
25 |
get
|
|
26 |
{
|
|
27 |
return testContextInstance; |
|
28 |
}
|
|
29 |
set
|
|
30 |
{
|
|
31 |
testContextInstance = value; |
|
32 |
}
|
|
33 |
}
|
|
34 |
||
35 |
#region Additional test attributes
|
|
36 |
//
|
|
37 |
//You can use the following additional attributes as you write your tests:
|
|
38 |
//
|
|
39 |
//Use ClassInitialize to run code before running the first test in the class
|
|
40 |
//[ClassInitialize()]
|
|
41 |
//public static void MyClassInitialize(TestContext testContext)
|
|
42 |
//{
|
|
43 |
//}
|
|
44 |
//
|
|
45 |
//Use ClassCleanup to run code after all tests in a class have run
|
|
46 |
//[ClassCleanup()]
|
|
47 |
//public static void MyClassCleanup()
|
|
48 |
//{
|
|
49 |
//}
|
|
50 |
//
|
|
51 |
//Use TestInitialize to run code before running each test
|
|
52 |
//[TestInitialize()]
|
|
53 |
//public void MyTestInitialize()
|
|
54 |
//{
|
|
55 |
//}
|
|
56 |
//
|
|
57 |
//Use TestCleanup to run code after each test has run
|
|
58 |
//[TestCleanup()]
|
|
59 |
//public void MyTestCleanup()
|
|
60 |
//{
|
|
61 |
//}
|
|
62 |
//
|
|
63 |
#endregion
|
|
64 |
||
65 |
||
66 |
/// <summary>
|
|
67 |
///A test for Weight
|
|
68 |
///</summary>
|
|
69 |
[Test]
|
|
70 |
public void WeightTest() |
|
71 |
{
|
|
72 |
PicasaEntry entry = new PicasaEntry(); |
|
73 |
entry.IsTag = true; |
|
74 |
TagAccessor target = new TagAccessor(entry); // TODO: Initialize to an appropriate value |
|
75 |
uint expected = 5; // TODO: Initialize to an appropriate value |
|
76 |
uint actual; |
|
77 |
target.Weight = expected; |
|
78 |
actual = target.Weight; |
|
79 |
Assert.AreEqual(expected, actual); |
|
80 |
}
|
|
81 |
||
82 |
/// <summary>
|
|
83 |
///A test for TagAccessor Constructor
|
|
84 |
///</summary>
|
|
85 |
[Test]
|
|
86 |
public void TagAccessorConstructorTest() |
|
87 |
{
|
|
88 |
PicasaEntry entry = new PicasaEntry(); |
|
89 |
entry.IsTag = true; |
|
90 |
TagAccessor target = new TagAccessor(entry); |
|
91 |
Assert.IsNotNull(target); |
|
92 |
}
|
|
93 |
}
|
|
94 |
}
|