Last modified 11 years ago Last modified on 12/28/08 23:13:03

Error: Macro BackLinksMenu(None) failed
compressed data is corrupt

Error: Macro TicketQuery(summary=S2S_CORE_MOCK_SERVER_R0, format=table, col=summary|owner|status|type|component|priority|effort|importance, rows=description|analysis_owners|analysis_reviewers|analysis_score|design_owners|design_reviewers|design_score|implementation_owners|implementation_reviewers|implementation_score|test_owners|test_reviewers|test_score|) failed
current transaction is aborted, commands ignored until end of transaction block



The main idea of this task is to create mock server for testing usage. The basic facade for the server core methods have to be defined and implemented.

Task requirements

  • The server facade basic interfaces should be created. More information and visualization about Facade - S2S_DEPLOY_TECHNOLOGIES_R0
  • Mock should be created. It is not a real jetty server just an instance which provide core functionality using the facade.
  • Unit tests using the mock server has to be present.

Task result

  • Mock server and basic server facade implementation.

Implementation idea

  • Implement the Facade so that it returns dummy users instead of real persisted User objects.
  • The server must runs offline, basicly the client has implementation of facade that doesn't communicate to real server.


How to demo

  • Run the test and show the new classes.


  • New Sophie 2 module named org.sophie2.server.connector for the client's connector will be added.
    • The new connector module will use the server module.
    • The new connector module will have SophieModule ancestor called ServerConnectorModule.
    • The ServerConnectorModule will provide client extension points representing implementations of the server facade.
    • In that revision the skeleton of the ServerConnectorModule class will be added and it will provide UserManager extension point, because for now only the UserManager interface represents the server facade (see S2S_WEB_SERVICES_R0).
  • There will be class DummyData that will contain all the dummy objects (entities, relations, etc...) for the mock server.
    • In this revision it will contain dummy groups, users and method to relate them without using the Persistence module.
  • There will be mock implementation of the UserManager interface in package named org.sophie2.server.connector.facade.mock in the connector module.
    • The implementation will be called MockUserManager.
    • This mock implementation will use the dummy objects defined in the DummyData class, in the org.sophie2.server.connector.facade.mock package.
  • I can't add UML class diagram because all the classes in the new module are implementations and dummy data.
  • The connector module is used to provide the Server facade to the client. While there is no running server the connector will provide the mock facade represented by the mock server implementation of it.

The tests for the mock UserManager are:


Implemented in 1009 and 1018



(Write comments for this or later revisions here.)