ocpayload: in DMV remove undesired trailing separator
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Fri, 1 Jul 2016 20:58:37 +0000 (22:58 +0200)
committerZiran Sun <ziran.sun@samsung.com>
Mon, 4 Jul 2016 11:00:20 +0000 (11:00 +0000)
commitf77bb129912cf91f1e8ad6ef8765e267dff4e5a5
tree86e7297e37202324bfcbd6e4057d702d4a8962ec
parent3a52cf577a058c676d35be1c24ab9275e9a0a7a3
ocpayload: in DMV remove undesired trailing separator

Also add more tests cases too.

Suggestion for improvements:

Note the test uses a different message container to prevent ambiguity:
 same one could be used but accessed at next indice
 because MessageContainer::setPayload
 actually adds given payload to internal list.

It would makes sense to rename method to MessageContainer::addPayload
 and eventually add a new different method like :
 MessageContainer::set(Payload) to reset list.

Bug: https://jira.iotivity.org/browse/IOT-1174
Change-Id: I9e7bf3c9eb7a311214e438ec2434d53b4ae0f313
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/9069
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
resource/csdk/stack/src/ocpayload.c
resource/unittests/OCRepresentationEncodingTest.cpp