示例#1
0
        public void TestReadPlaceDescription()
        {
            var query = new GedcomxPlaceSearchQueryBuilder().Name("Utah").TypeId("47");
            var results = places.SearchForPlaces(query, QueryParameter.Count(30));
            var state = results.ReadPlaceDescription(results.Entity.Entries.First());

            Assert.DoesNotThrow(() => state.IfSuccessful());
            Assert.AreEqual(HttpStatusCode.OK, state.Response.StatusCode);
            Assert.IsNotNull(state.Entity);
            Assert.IsNotNull(state.Entity.Places);
            Assert.Greater(state.Entity.Places.Count, 0);
        }
示例#2
0
        public void TestSearchForPlacesUnderAJurisdiction()
        {
            var query = new GedcomxPlaceSearchQueryBuilder().Name("Paris").ParentId("329", false);
            var state = places.SearchForPlaces(query, QueryParameter.Count(30));

            Assert.DoesNotThrow(() => state.IfSuccessful());
            Assert.AreEqual(HttpStatusCode.OK, state.Response.StatusCode);
            Assert.IsNotNull(state.Entity);
            Assert.IsNotNull(state.Entity.Entries);
            Assert.Greater(state.Entity.Entries.Count, 0);
        }