/clients/cs/src/unittests/youtube/QueryStringTest.cs

http://google-gdata.googlecode.com/ · C# · 90 lines · 38 code · 11 blank · 41 comment · 0 complexity · d6cdeff834208413fbe12a9776affe91 MD5 · raw file

  1. using NUnit.Framework;
  2. using Google.GData.Client.UnitTests;
  3. using Google.GData.YouTube;
  4. namespace Google.GData.Client.UnitTests.YouTube
  5. {
  6. /// <summary>
  7. ///This is a test class for QueryStringTest and is intended
  8. ///to contain all QueryStringTest Unit Tests
  9. ///</summary>
  10. [TestFixture]
  11. [Category("YouTube")]
  12. public class QueryStringTest
  13. {
  14. private TestContext testContextInstance;
  15. /// <summary>
  16. ///Gets or sets the test context which provides
  17. ///information about and functionality for the current test run.
  18. ///</summary>
  19. public TestContext TestContext
  20. {
  21. get
  22. {
  23. return testContextInstance;
  24. }
  25. set
  26. {
  27. testContextInstance = value;
  28. }
  29. }
  30. #region Additional test attributes
  31. //
  32. //You can use the following additional attributes as you write your tests:
  33. //
  34. //Use ClassInitialize to run code before running the first test in the class
  35. //[ClassInitialize()]
  36. //public static void MyClassInitialize(TestContext testContext)
  37. //{
  38. //}
  39. //
  40. //Use ClassCleanup to run code after all tests in a class have run
  41. //[ClassCleanup()]
  42. //public static void MyClassCleanup()
  43. //{
  44. //}
  45. //
  46. //Use TestInitialize to run code before running each test
  47. //[TestInitialize()]
  48. //public void MyTestInitialize()
  49. //{
  50. //}
  51. //
  52. //Use TestCleanup to run code after each test has run
  53. //[TestCleanup()]
  54. //public void MyTestCleanup()
  55. //{
  56. //}
  57. //
  58. #endregion
  59. /// <summary>
  60. ///A test for QueryString Constructor
  61. ///</summary>
  62. [Test]
  63. public void QueryStringConstructorTest1()
  64. {
  65. QueryString target = new QueryString();
  66. Assert.IsNull(target.Value, "Object value should be null after construction");
  67. }
  68. /// <summary>
  69. ///A test for QueryString Constructor
  70. ///</summary>
  71. [Test]
  72. public void QueryStringConstructorTest()
  73. {
  74. string initValue = "secret test string";
  75. QueryString target = new QueryString(initValue);
  76. Assert.AreEqual(target.Value, initValue, "Object value should be identical after construction");
  77. }
  78. }
  79. }