Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350907 - Introduce a model of the protocol message for testing
Summary: Introduce a model of the protocol message for testing
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.5   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.5 M1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 311355
  Show dependency tree
 
Reported: 2011-07-01 05:18 EDT by Holger Staudacher CLA
Modified: 2011-07-05 15:33 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Staudacher CLA 2011-07-01 05:18:41 EDT
In the protocol tests we are currently using a JSON implementation to test the content of the messages. This is much better than comparing strings but not optimal. The tests contain a lot of clutter that extracts the inner details of a message. This happens in every test. It would be better to create a small model of a message which accepts a string (the message) and provides accessors to the content of the message. This would make the tests much more readable. Another benefit of this would be that this model could be used in our LCA tests when we migrate to use the protocol.
Comment 1 Holger Staudacher CLA 2011-07-05 15:33:29 EDT
I introduced a Message object which accepts json messages. The Message creates different operation objects which are of the type as the associated operation type form the message. The different operations has convenience methods to provide an easier way for accessing the inner details of an operation.