1
using NUnit.Framework;
2
using Google.GData.Client.UnitTests;
3
using Google.GData.YouTube;
5
namespace Google.GData.Client.UnitTests.YouTube
10
///This is a test class for CommentEntryTest and is intended
11
///to contain all CommentEntryTest Unit Tests
13
[TestFixture][Category("YouTube")]
14
public class CommentEntryTest
18
private TestContext testContextInstance;
21
///Gets or sets the test context which provides
22
///information about and functionality for the current test run.
24
public TestContext TestContext
28
return testContextInstance;
32
testContextInstance = value;
36
#region Additional test attributes
38
//You can use the following additional attributes as you write your tests:
40
//Use ClassInitialize to run code before running the first test in the class
42
//public static void MyClassInitialize(TestContext testContext)
46
//Use ClassCleanup to run code after all tests in a class have run
48
//public static void MyClassCleanup()
52
//Use TestInitialize to run code before running each test
54
//public void MyTestInitialize()
58
//Use TestCleanup to run code after each test has run
60
//public void MyTestCleanup()
68
///A test for CommentEntry Constructor
71
public void CommentEntryConstructorTest()
73
CommentEntry target = new CommentEntry();
74
Assert.IsNotNull(target,"object should not be null");
78
///A test for replyto and replies properties
81
public void CommentEntryReplyToTest()
83
CommentEntry target = new CommentEntry();
84
Assert.AreEqual(target.Replies.Count, 0," list should be emptyl");
85
CommentEntry other = new CommentEntry();
86
other.SelfUri = new AtomUri("http://www.test.org");
87
target.ReplyTo(other);
88
Assert.AreEqual(target.Replies.Count, 1," list should be emptyl");