MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / TEST_F

Function TEST_F

test/copy/import_export.cpp:15–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13};
14
15TEST_F(ImportExportDBTest, Test) {
16 auto tempDir = TestHelper::getTempDir(getTestGroupAndName());
17 auto dbPath = common::LocalFileSystem::joinPath(tempDir, "export.tmp");
18 auto result = conn->query("EXPORT DATABASE '" + dbPath + "'");
19 ASSERT_TRUE(result->isSuccess()) << result->getErrorMessage();
20 result.reset();
21 createNewDB();
22 result = conn->query("IMPORT DATABASE '" + dbPath + "'");
23 ASSERT_TRUE(result->isSuccess()) << result->getErrorMessage();
24 result = conn->query("MATCH (a:person)-[e:knows]->(b:person) RETURN COUNT(*)");
25 ASSERT_TRUE(result->isSuccess()) << result->getErrorMessage();
26 ASSERT_TRUE(result->hasNext());
27 ASSERT_EQ(result->getNext()->getValue(0)->getValue<int64_t>(), 14);
28}
29
30} // namespace testing
31} // namespace lbug

Callers

nothing calls this directly

Calls 7

queryMethod · 0.45
isSuccessMethod · 0.45
getErrorMessageMethod · 0.45
resetMethod · 0.45
hasNextMethod · 0.45
getValueMethod · 0.45
getNextMethod · 0.45

Tested by

no test coverage detected