PageRenderTime 43ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/Geocoding/Artem.GoogleGeocoding.Tests/IssueTest.cs

#
C# | 91 lines | 44 code | 13 blank | 34 comment | 0 complexity | 81baab9b9b3a84feb240ba9f3742c762 MD5 | raw file
Possible License(s): MIT
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Microsoft.VisualStudio.TestTools.UnitTesting;
  6. using Artem.Google.Net;
  7. namespace Artem.GoogleGeocoding.Tests {
  8. /// <summary>
  9. /// Unit test for project issues. Most recent first.
  10. /// </summary>
  11. [TestClass]
  12. public class IssueTest {
  13. #region Ctor
  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. get {
  21. return testContextInstance;
  22. }
  23. set {
  24. testContextInstance = value;
  25. }
  26. }
  27. #region Additional test attributes
  28. //
  29. //You can use the following additional attributes as you write your tests:
  30. //
  31. //Use ClassInitialize to run code before running the first test in the class
  32. //[ClassInitialize()]
  33. //public static void MyClassInitialize(TestContext testContext)
  34. //{
  35. //}
  36. //
  37. //Use ClassCleanup to run code after all tests in a class have run
  38. //[ClassCleanup()]
  39. //public static void MyClassCleanup()
  40. //{
  41. //}
  42. //
  43. //Use TestInitialize to run code before running each test
  44. //[TestInitialize()]
  45. //public void MyTestInitialize()
  46. //{
  47. //}
  48. //
  49. //Use TestCleanup to run code after each test has run
  50. //[TestCleanup()]
  51. //public void MyTestCleanup()
  52. //{
  53. //}
  54. //
  55. #endregion
  56. #endregion
  57. #region Methods
  58. [TestMethod]
  59. public void Issue14376() {
  60. var request = new GeoRequest("BH5 1DP");
  61. var response = request.GetResponse();
  62. Assert.AreEqual(GeoStatus.OK, response.Status);
  63. }
  64. [TestMethod]
  65. public void Issue13038() {
  66. GeoRequest request = new GeoRequest("Yonge and Finch Toronto Canada Ontario");
  67. GeoResponse response = request.GetResponse();
  68. Assert.AreEqual(GeoStatus.OK, response.Status);
  69. }
  70. [TestMethod]
  71. public void Issue11898() {
  72. GeoRequest request = new GeoRequest("4 Cassia Ct, Alice Springs, Northern Territory, 0870, Australia");
  73. GeoResponse response = request.GetResponse();
  74. Assert.AreEqual(GeoStatus.OK, response.Status);
  75. }
  76. #endregion
  77. }
  78. }