Newer
Older
function test_suite=test_caosdb()
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions=localfunctions();
catch % no problem; early Matlab versions can use initTestSuite fine
end
initTestSuite;
end
function test_connection()
% Default connection
c1 = Caosdb();
info = c1.info();
% another working connection
c2 = Caosdb(connection = "local-caosdb-admin");
c2.info();
% This connection should fail
c3 = Caosdb(connection = "does-not-exist");
assertExceptionThrown("c3.info", "16");
end