diff 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
line wrap: on
line diff
--- a/m-toolbox/classes/tests/database/@ltpda_database/init.m	Mon Dec 05 16:20:06 2011 +0100
+++ b/m-toolbox/classes/tests/database/@ltpda_database/init.m	Mon Dec 05 16:20:06 2011 +0100
@@ -19,16 +19,9 @@
   
   if ~utp.testRunner.skipRepoTests()
     
-    % Get the connection from the repository manager
-    rm = LTPDARepositoryManager();
-    conn = rm.findConnections(utp.testRunner.repositoryPlist);
-    if isempty(conn)
-      conn = rm.newConnection(utp.testRunner.repositoryPlist);
-    end
-    
-    % Check that we get only one connection
-    assert(numel(conn) == 1, sprintf('Found more than one connection in the repository manager for the PLIST: %s', char(utp.testRunner.repositoryPlist)));
-    
+    % Get database connection
+    conn = LTPDADatabaseConnectionManager().connect(utp.testRunner.repositoryPlist);
+
     % Store the connection
     utp.conn = conn;