From 360657d16d1974e096d8d3bb61e18fee35598d1a Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 18 Nov 2019 23:47:17 +0100 Subject: createGeodeticDatum(): query and set publicationDate --- test/unit/test_factory.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/unit/test_factory.cpp') diff --git a/test/unit/test_factory.cpp b/test/unit/test_factory.cpp index 15feda64..93b2ef34 100644 --- a/test/unit/test_factory.cpp +++ b/test/unit/test_factory.cpp @@ -251,6 +251,17 @@ TEST(factory, AuthorityFactory_createGeodeticDatum) { auto extent = domain->domainOfValidity(); ASSERT_TRUE(extent != nullptr); EXPECT_TRUE(extent->isEquivalentTo(factory->createExtent("1262").get())); + EXPECT_FALSE(grf->publicationDate().has_value()); +} + +// --------------------------------------------------------------------------- + +TEST(factory, AuthorityFactory_createGeodeticDatum_with_publication_date) { + auto factory = AuthorityFactory::create(DatabaseContext::create(), "EPSG"); + //'World Geodetic System 1984 (G1762) + auto grf = factory->createGeodeticDatum("1156"); + EXPECT_TRUE(grf->publicationDate().has_value()); + EXPECT_EQ(grf->publicationDate()->toString(), "2005-01-01"); } // --------------------------------------------------------------------------- -- cgit v1.2.3