aboutsummaryrefslogtreecommitdiff
path: root/test/unit/test_factory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/test_factory.cpp')
-rw-r--r--test/unit/test_factory.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/unit/test_factory.cpp b/test/unit/test_factory.cpp
index edc8b190..02033a8a 100644
--- a/test/unit/test_factory.cpp
+++ b/test/unit/test_factory.cpp
@@ -3441,6 +3441,39 @@ TEST(factory, getUnitList) {
// ---------------------------------------------------------------------------
+TEST(factory, getCelestialBodyList) {
+ auto ctxt = DatabaseContext::create();
+ {
+ auto factory = AuthorityFactory::create(ctxt, std::string());
+ auto list = factory->getCelestialBodyList();
+ EXPECT_GT(list.size(), 1U);
+ bool foundPROJ = false;
+ bool foundESRI = false;
+ bool foundEarth = false;
+ for (const auto &info : list) {
+ foundESRI |= info.authName == "ESRI";
+ foundPROJ |= info.authName == "PROJ";
+ if (info.authName == "PROJ") {
+ EXPECT_EQ(info.name, "Earth");
+ foundEarth = true;
+ }
+ }
+ EXPECT_TRUE(foundESRI);
+ EXPECT_TRUE(foundPROJ);
+ EXPECT_TRUE(foundEarth);
+ }
+ {
+ auto factory = AuthorityFactory::create(ctxt, "ESRI");
+ auto list = factory->getCelestialBodyList();
+ EXPECT_GT(list.size(), 1U);
+ for (const auto &info : list) {
+ EXPECT_EQ(info.authName, "ESRI");
+ }
+ }
+}
+
+// ---------------------------------------------------------------------------
+
TEST(factory, objectInsertion) {
// Cannot nest startInsertStatementsSession