Mercurial > hg > ltpda
comparison m-toolbox/classes/tests/database/@ltpda_database/init.m @ 25:79dc7091dbbc database-connection-manager
Update tests
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Mon, 05 Dec 2011 16:20:06 +0100 |
parents | f0afece42f48 |
children |
comparison
equal
deleted
inserted
replaced
24:056f8e1e995e | 25:79dc7091dbbc |
---|---|
17 % Call super class | 17 % Call super class |
18 init@ltpda_utp(varargin{:}); | 18 init@ltpda_utp(varargin{:}); |
19 | 19 |
20 if ~utp.testRunner.skipRepoTests() | 20 if ~utp.testRunner.skipRepoTests() |
21 | 21 |
22 % Get the connection from the repository manager | 22 % Get database connection |
23 rm = LTPDARepositoryManager(); | 23 conn = LTPDADatabaseConnectionManager().connect(utp.testRunner.repositoryPlist); |
24 conn = rm.findConnections(utp.testRunner.repositoryPlist); | 24 |
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 | 25 % Store the connection |
33 utp.conn = conn; | 26 utp.conn = conn; |
34 | 27 |
35 % Submit test data | 28 % Submit test data |
36 utp.submitTestData(varargin{2:end}); | 29 utp.submitTestData(varargin{2:end}); |