TEST_F(ManifestTest, MetadataElement_MissingKey) {
StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto apps = GListRange<application_x*>(m->application);
- application_x* app = *apps.begin();
-
- std::map<std::string, std::string> meta_data_map;
- for (metadata_x* meta_data : GListRange<metadata_x*>(app->metadata)) {
- if (meta_data->key && meta_data->value)
- meta_data_map[meta_data->key] = meta_data->value;
- }
- ASSERT_EQ(meta_data_map.size(), 0);
+ ASSERT_FALSE(runner.Run());
}
TEST_F(ManifestTest, CategoryElement_Valid) {
TEST_F(ManifestTest, CategoryElement_MissingName) {
StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto apps = GListRange<application_x*>(m->application);
- application_x* app = *apps.begin();
-
- std::vector<std::string> categories;
- for (const char* category : GListRange<char*>(app->category)) {
- categories.push_back(category);
- }
- ASSERT_TRUE(categories.empty());
+ ASSERT_FALSE(runner.Run());
}
TEST_F(ManifestTest, CategoryElement_MultipleElements) {