Mercurial > hg > ltpda
comparison m-toolbox/classes/tests/database/@ltpda_database/init.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children | 79dc7091dbbc |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 % INIT initialize the unit test class. | |
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3 % | |
4 % DESCRIPTION: INIT initialize the unit test class. | |
5 % This method is called before the test methods. | |
6 % | |
7 % CALL: init(); | |
8 % | |
9 % VERSION: $Id: init.m,v 1.3 2011/05/24 19:22:43 ingo Exp $ | |
10 % | |
11 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
12 | |
13 function varargout = init(varargin) | |
14 | |
15 utp = varargin{1}; | |
16 | |
17 % Call super class | |
18 init@ltpda_utp(varargin{:}); | |
19 | |
20 if ~utp.testRunner.skipRepoTests() | |
21 | |
22 % Get the connection from the repository manager | |
23 rm = LTPDARepositoryManager(); | |
24 conn = rm.findConnections(utp.testRunner.repositoryPlist); | |
25 if isempty(conn) | |
26 conn = rm.newConnection(utp.testRunner.repositoryPlist); | |
27 end | |
28 | |
29 % Check that we get only one connection | |
30 assert(numel(conn) == 1, sprintf('Found more than one connection in the repository manager for the PLIST: %s', char(utp.testRunner.repositoryPlist))); | |
31 | |
32 % Store the connection | |
33 utp.conn = conn; | |
34 | |
35 % Submit test data | |
36 utp.submitTestData(varargin{2:end}); | |
37 | |
38 end | |
39 | |
40 end | |
41 |