/* ****************************************************************************
*
* render_xml - 
*/
TEST(ContextAttributeResponseVector, render_xml)
{
  ContextAttributeResponseVector  carV;
  ContextAttribute                ca("caName", "caType", "caValue");
  ContextAttributeResponse        car;  
  std::string                     out;
  const char*                     outfile = "ngsi10.contextResponseList.render.invalid.xml";
  ConnectionInfo                  ci;

  // 1. empty vector
  car.statusCode.fill(SccBadRequest, "Empty Vector");
  out = carV.render(&ci, ContextEntityAttributes, "");
  EXPECT_STREQ("", out.c_str());

  // 2. normal case
  car.contextAttributeVector.push_back(&ca);
  carV.push_back(&car);

  out = carV.render(&ci, ContextEntityAttributes, "");
  EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile)) << "Error getting test data from '" << outfile << "'";
  EXPECT_STREQ(expectedBuf, out.c_str());
}