MatrixBerryCore
mlunit_test_nostorage.m
Go to the documentation of this file.
1 classdef mlunit_test_nostorage < mxberry.unittest.TestCase
2  properties (SetAccess=private,GetAccess=public)
3  map
4  end
5  %
6  methods
7  function self = mlunit_test_nostorage(varargin)
8  self = self@mxberry.unittest.TestCase(varargin{:});
9  end
10  end
11  methods (TestMethodSetup)
12  %
13  function self = setUp(self)
14  self.map=mxberry.core.cont.ondisk.HashMapXMLMetaData(...
15  'storageFormat','none');
16  self.map.removeAll();
17  end
18  end
19  methods (Test)
20  function self=test_putGetWithMetaData(self)
21  rel1=struct('a',1,'b',2);
22  rel2=struct('a',1,'b',2,'c',3);
23  metaData1=struct('version','1.0','author','test1');
24  metaData2=struct('version','2.0','author','test2',...
25  'application','testApplication');
26  inpObjList={rel1,rel2};
27  keyList={'rel1','rel2'};
28  metaDataList={metaData1,metaData2};
29  self.map.put(keyList,inpObjList,metaDataList);
30  inpArgList={fliplr(keyList),'UniformOutput',false}; %#ok<NASGU>
31  self.runAndCheckError(...
32  '[valueObjList,metaDataGetList]=self.map.get(inpArgList{:})',...
33  'AHASHMAP:GETFILENAMEBYKEY:noRecord');
34  %
35  self.map.removeAll();
36  end
37  end
38 end