Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composite catalog implementation #9869

Closed
1 task done
mantid-builder opened this issue Feb 17, 2014 · 1 comment
Closed
1 task done

Composite catalog implementation #9869

mantid-builder opened this issue Feb 17, 2014 · 1 comment
Labels
Framework Issues and pull requests related to components in the Framework
Milestone

Comments

@mantid-builder
Copy link
Collaborator

Original Reporter: Jay Rainey

This ticket is blocked by :

This ticket is blocks : TRAC7640, TRAC9084

== Implementation ==

There needs to exist support for multiple catalogs within Mantid, which can be achieved via a composite pattern.

  1. A new class (CompositeCatalog) needs to be created.
  2. This class will hold a list of ICatalog instances (shared pointers) named m_catalogs.
  3. Catalogs can be added to m_catalogs using an add() method.
  4. The class will inherit from ICatalog and override all the parents methods.
  5. Each method will iterate over m_catalogs and call the exact method from the catalog.

== Unit test ==

A test class needs to be created for this composite class to verify the functionality works as expected.

  1. Create a test class (CompositeCatalogTest).

  2. Create a DummyCatalog class within the test class that extends ICatalog and then overrides all methods (to verify that each work).

  3. Have a static counter in each method, in order to verify when they are called.

  4. Create a test method for each ICatalog method.

  5. Create several (3-5) DummyCatalogs in each method, and call the related ICatalog method, verifying that the counter increased as expected.

    Keywords: ICAT

@mantid-builder
Copy link
Collaborator Author

This issue was originally trac ticket 9026

@mantid-builder mantid-builder added the Framework Issues and pull requests related to components in the Framework label Jun 3, 2015
@mantid-builder mantid-builder added this to the Release 3.2 milestone Jun 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework Issues and pull requests related to components in the Framework
Projects
None yet
Development

No branches or pull requests

1 participant