InterMine::Model::TestModel - A model to make testing easy for other modules.
use InterMine::Model::TestModel; # For a shared instance: my $singleton = InterMine::Model::TestModel->instance; # For a freshly minted model: my $model = InterMine::Model::TestModel->new;
This module produces a predefined version of an InterMine::Model for testing purposes. The model itself has 19 classes based around a hierarchical company structure.
To view the model as an xml file, see: http://trac.flymine.org/browser/trunk/intermine/objectstore/model/testmodel/testmodel_model.xml
Useful classes in the model are
name (Str) age (Int) fullTime (Bool) department (Department) address (Address)
employees (ArrayRef[Employee]) company (Company) manager (Manager) name (Str) address (Address)
departments (ArrayRef[Department]) name (Str) vatNumber (Int) contractors (ArrayRef[Contractor]) secretarys (ArrayRef[Secretary]) address (Address)
returns a new instance of the test model
returns a shared instance of the testmodel
In most cases you will want to use instance, as the model is for the most part read-only.
instance
You only need to use new if you are testing the object cache.
new
FlyMine <support@flymine.org>
<support@flymine.org>
Please report any bugs or feature requests to support@flymine.org.
support@flymine.org
You can find documentation for this module with the perldoc command.
perldoc InterMine::Model::TestModel
You can also look for information at:
FlyMine
http://www.flymine.org
Copyright 2006,2007,2008,2009, 2010, 2011 FlyMine, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install InterMine::Model, copy and paste the appropriate command in to your terminal.
cpanm
cpanm InterMine::Model
CPAN shell
perl -MCPAN -e shell install InterMine::Model
For more information on module installation, please visit the detailed CPAN module installation guide.