Exemplo n.º 1
0
TEST(RepoBSONTest, GetFileList)
{
	std::vector < uint8_t > in;

	size_t size = 100;

	in.resize(size);

	std::unordered_map < std::string, std::pair<std::string, std::vector<uint8_t>>> mapping;
	mapping["orgRef"] = std::pair<std::string, std::vector<uint8_t>>("blah", in);

	RepoBSON binBson(testBson, mapping);
	auto fileList = binBson.getFileList();

	EXPECT_EQ(1, fileList.size());
	EXPECT_TRUE(fileList[0].first == "orgRef");
	EXPECT_EQ(0, testBson.getFileList().size());
	EXPECT_EQ(0, emptyBson.getFileList().size());
}