view m-toolbox/test/test_submit_check.m @ 51:9d5c88356247 database-connection-manager

Make unit tests database connection parameters configurable
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 07 Dec 2011 17:24:37 +0100
parents f0afece42f48
children
line wrap: on
line source

% A test script to figure out how to do the submission test
mc

b = ao(1:10);

%% Case 1

submit(b) 

%% Case 2

pl = plist('experiment title', 'a nice experiment')
submit(b,pl) 

%% Case 3

pl = plist('hostname', 'localhost', 'database', 'ltpda_test', 'experiment title', 'a nice experiment')
submit(b,pl) 

%% Case 4

pl = plist('hostname', 'localhost', 'database', 'ltpda_test', 'username', 'hewitson', ...
  'experiment title', 'a nice experiment', ...
  'experiment description', 'describe this thing', ...
  'analysis description', 'no analysis', 'keywords', 'a,b,c')
submit(b,pl) 

%% Case 5
pl = plist('hostname', 'localhost', 'database', 'ltpda_test', 'username', 'hewitson', 'password', 'asd', ...
  'experiment title', 'a nice experiment', ...
  'experiment description', 'describe this thing', ...
  'analysis description', 'no analysis', ...
  'keywords', 'a,b,c', ...
  'quantity', 'none', ...
  'reference ids', '1,2,3', ...
  'additional comments', 'none', ...
  'additional authors', 'none')
submit(b,pl) 

%% Case 6

pl = plist('hostname', 'localhost', 'database', 'ltpda_test', 'username', 'hewitson', ...
  'experiment title', 'a nice experiment', ...
  'experiment description', 'describe this thing', ...
  'analysis description', 'no analysis', 'keywords', 'a,b,c', 'no dialog', true)
submit(b,pl) 

%% Case 7

pl = plist('hostname', 'localhost', 'database', 'ltpda_test', 'username', 'hewitson', 'password', 'asd', ...
  'experiment title', 'a nice experiment', ...
  'experiment description', 'describe this thing', ...
  'analysis description', 'no analysis', 'keywords', 'a,b,c', 'no dialog', true)
submit(b,pl) 

%% Case 8

pl = plist('hostname', 'localhost', 'database', 'ltpda_test', 'username', 'hewitson', 'password', 'asd', ...
  'experiment title', 'a nice experiment', ...
  'experiment description', 'describe this thing', ...
  'analysis description', 'no analysis', 'keywords', 'a,b,c', 'no dialog', false)
submit(b,pl) 


%% Case 9

pl = plist('hostname', 'localhost', 'database', 'ltpda_test', 'username', 'hewitson', 'password', 'asd', ...
  'experiment title', 'a nice experiment', ...
  'experiment description', 'describe this thing', ...
  'analysis description', 'no analysis', 'keywords', 'a,b,c')
submit(b,pl) 


%% Case 10

pl = plist('hostname', 'localhost', 'database', 'ltpda_test', 'username', 'hewitson', 'password', 'asd', ...
  'experiment title', 'a nice experiment', ...
  'experiment description', 'describe this thing', ...
  'analysis description', 'no analysis', 'keywords', 'a,b,c', 'no dialog', true)
bsubmit(b,pl)