Example #1
0
        public void GetSpecificPostcode()
        {
            ApiHalResultWrapper result = _client.GetPostcodes("6545");

            Assert.IsNotNull(result);
            Assert.IsNotNull(result.Links.Self);
            Assert.AreEqual(20, result.Embedded.Postcodes.Count);
            Assert.AreEqual("Westkanaaldijk", result.Embedded.Postcodes[0].Streets[0]);
            Assert.AreEqual("Nijmegen", result.Embedded.Postcodes[0].City.Label);
        }
        public void GetLargePostcodeSet()
        {
            PostcodeApiClient   client = new PostcodeApiClient(ApiKey);
            ApiHalResultWrapper result = client.GetPostcodes("1097");

            Assert.IsNotNull(result);
            Assert.IsNotNull(result.Links.Self);
            Assert.IsNotNull(result.Links.Next);
            Assert.IsTrue(result.Embedded.Postcodes.Count == 20);
            Assert.AreEqual("Amsterdam", result.Embedded.Postcodes[0].City.Label);
        }