PageRenderTime 82ms CodeModel.GetById 40ms app.highlight 3ms RepoModel.GetById 37ms app.codeStats 0ms

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

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