1
using Google.GData.Photos;
3
using Google.GData.Client.UnitTests;
4
namespace Google.GData.Client.UnitTests.Picasa
9
///This is a test class for PhotoAccessorTest and is intended
10
///to contain all PhotoAccessorTest Unit Tests
12
[TestFixture][Category("Picasa")]
13
public class PhotoAccessorTest
17
private TestContext testContextInstance;
20
///Gets or sets the test context which provides
21
///information about and functionality for the current test run.
23
public TestContext TestContext
27
return testContextInstance;
31
testContextInstance = value;
35
#region Additional test attributes
37
//You can use the following additional attributes as you write your tests:
39
//Use ClassInitialize to run code before running the first test in the class
41
//public static void MyClassInitialize(TestContext testContext)
45
//Use ClassCleanup to run code after all tests in a class have run
47
//public static void MyClassCleanup()
51
//Use TestInitialize to run code before running each test
53
//public void MyTestInitialize()
57
//Use TestCleanup to run code after each test has run
59
//public void MyTestCleanup()
70
public void WidthTest()
72
PicasaEntry entry = new PhotoEntry();
73
PhotoAccessor target = new PhotoAccessor(entry);
74
int expected = 5; // TODO: Initialize to an appropriate value
76
target.Width = expected;
77
actual = target.Width;
78
Assert.AreEqual(expected, actual);
85
public void VersionTest()
87
PicasaEntry entry = new PhotoEntry();
88
PhotoAccessor target = new PhotoAccessor(entry);
89
string expected = "TestValue";
91
target.Version = expected;
92
actual = target.Version;
93
Assert.AreEqual(expected, actual);
97
///A test for Timestamp
100
public void TimestampTest()
102
PicasaEntry entry = new PhotoEntry();
103
PhotoAccessor target = new PhotoAccessor(entry);
104
ulong expected = 122; // TODO: Initialize to an appropriate value
106
target.Timestamp = expected;
107
actual = target.Timestamp;
108
Assert.AreEqual(expected, actual);
115
public void SizeTest()
117
PicasaEntry entry = new PhotoEntry();
118
PhotoAccessor target = new PhotoAccessor(entry);
119
long expected = 12; // TODO: Initialize to an appropriate value
121
target.Size = expected;
122
actual = target.Size;
123
Assert.AreEqual(expected, actual);
127
///A test for Rotation
130
public void RotationTest()
132
PicasaEntry entry = new PhotoEntry();
133
PhotoAccessor target = new PhotoAccessor(entry);
134
int expected = 45; // TODO: Initialize to an appropriate value
136
target.Rotation = expected;
137
actual = target.Rotation;
138
Assert.AreEqual(expected, actual);
142
///A test for Position
145
public void PositionTest()
147
PicasaEntry entry = new PhotoEntry();
148
PhotoAccessor target = new PhotoAccessor(entry);
149
double expected = 0.5F; // TODO: Initialize to an appropriate value
151
target.Position = expected;
152
actual = target.Position;
153
Assert.AreEqual(expected, actual);
157
///A test for PhotoTitle
160
public void PhotoTitleTest()
162
PicasaEntry entry = new PhotoEntry();
163
PhotoAccessor target = new PhotoAccessor(entry);
164
string expected = "TestValue";
166
target.PhotoTitle = expected;
167
actual = target.PhotoTitle;
168
Assert.AreEqual(expected, actual);
172
///A test for PhotoSummary
175
public void PhotoSummaryTest()
177
PicasaEntry entry = new PhotoEntry();
178
PhotoAccessor target = new PhotoAccessor(entry);
179
string expected = "TestValue";
181
target.PhotoSummary = expected;
182
actual = target.PhotoSummary;
183
Assert.AreEqual(expected, actual);
187
///A test for Longitude
190
public void LongitudeTest()
192
PicasaEntry entry = new PhotoEntry();
193
PhotoAccessor target = new PhotoAccessor(entry);
194
double expected = 12.5F; // TODO: Initialize to an appropriate value
196
target.Longitude = expected;
197
actual = target.Longitude;
198
Assert.AreEqual(expected, actual);
202
///A test for Latitude
205
public void LatitudeTest()
207
PicasaEntry entry = new PhotoEntry();
208
PhotoAccessor target = new PhotoAccessor(entry);
209
double expected = 12.5F; // TODO: Initialize to an appropriate value
211
target.Latitude = expected;
212
actual = target.Latitude;
213
Assert.AreEqual(expected, actual);
222
PicasaEntry entry = new PhotoEntry();
223
PhotoAccessor target = new PhotoAccessor(entry);
224
string expected = "TestValue";
226
target.Id = expected;
228
Assert.AreEqual(expected, actual);
235
public void HeightTest()
237
PicasaEntry entry = new PhotoEntry();
238
PhotoAccessor target = new PhotoAccessor(entry);
239
int expected = 12; // TODO: Initialize to an appropriate value
241
target.Height = expected;
242
actual = target.Height;
243
Assert.AreEqual(expected, actual);
247
///A test for CommentingEnabled
250
public void CommentingEnabledTest()
252
PicasaEntry entry = new PhotoEntry();
253
PhotoAccessor target = new PhotoAccessor(entry);
254
bool expected = true;
256
target.CommentingEnabled = expected;
257
actual = target.CommentingEnabled;
258
Assert.AreEqual(expected, actual);
262
///A test for CommentCount
265
public void CommentCountTest()
267
PicasaEntry entry = new PhotoEntry();
268
PhotoAccessor target = new PhotoAccessor(entry);
269
uint expected = 12; // TODO: Initialize to an appropriate value
271
target.CommentCount = expected;
272
actual = target.CommentCount;
273
Assert.AreEqual(expected, actual);
280
public void ClientTest()
282
PicasaEntry entry = new PhotoEntry();
283
PhotoAccessor target = new PhotoAccessor(entry);
284
string expected = "TestValue";
286
target.Client = expected;
287
actual = target.Client;
288
Assert.AreEqual(expected, actual);
292
///A test for Checksum
295
public void ChecksumTest()
297
PicasaEntry entry = new PhotoEntry();
298
PhotoAccessor target = new PhotoAccessor(entry);
300
string expected = "TestValue";
302
target.Checksum = expected;
303
actual = target.Checksum;
304
Assert.AreEqual(expected, actual);
308
///A test for AlbumId
311
public void AlbumIdTest()
313
PicasaEntry entry = new PhotoEntry();
314
PhotoAccessor target = new PhotoAccessor(entry);
315
string expected = "TestValue";
317
target.AlbumId = expected;
318
actual = target.AlbumId;
319
Assert.AreEqual(expected, actual);