Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 350907

Summary: Introduce a model of the protocol message for testing
Product: [RT] RAP Reporter: Holger Staudacher <holger.staudacher>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.5   
Target Milestone: 1.5 M1   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 311355    

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.