/* **************************************************************************** * * notFoundThenFound - */ TEST(mapGetIndividualContextEntity, notFoundThenFound) { HttpStatusCode ms; ContextElementResponse response; prepareDatabase("E1", "Room"); ms = mapGetIndividualContextEntity("NotFound", &response); EXPECT_EQ(ms, SccOk); ms = mapGetIndividualContextEntity("E1", &response); EXPECT_EQ(SccOk, ms); EXPECT_STREQ("E1", response.contextElement.entityId.id.c_str()); mongoDisconnect(); }
/* **************************************************************************** * * getAllEntitiesWithTypeAndId - */ extern std::string getAllEntitiesWithTypeAndId ( ConnectionInfo* ciP, int components, std::vector<std::string>& compV, ParseData* parseDataP ) { std::string answer; std::string enType = compV[3]; std::string enId = compV[5]; ContextElementResponse response; LM_T(LmtConvenience, ("CONVENIENCE: got 'GET' request with type='%s', and id='%s'", enType.c_str(), enId.c_str())); ciP->httpStatusCode = mapGetIndividualContextEntity(enId, enType, EntityTypeEmptyOrNotEmpty, &response, ciP); answer = response.render(ciP, IndividualContextEntity, ""); response.release(); return answer; }