function test_suite = testData
initTestSuite;
end

function testConstructor
    d = Data;
    assertEqual(class(d),'Data');
end

function testInit
    d = Data;
    d.init;
    assertEqual(size(d.Grid2.cells,2),1);
    assertEqual(size(d.Grid1.cells,2),1);
    assertEqual(size(d.Grid0.Cells,2),1);
end

function testClone
    d = Data;
    d.init;
    d.function_name = 'test_name';
    d.function_inputs = 'input_test';
    d.checked = 1;
    d.Grid1.cells(1).cond_text = 'test_cond';
    d2 = d.clone([]);
    assertEqual(d2.function_name,'');
    assertEqual(d2.function_inputs,d.function_inputs);
    assertEqual(d2.Grid1.cells(1).cond_text,'test_cond');
end

function testClone2
    d = Data;
    d2 = d.clone;
    assertEqual(d2,[]);
end

function testSave
    d = Data;
    d.init;
    d.function_name = 'test_file';
    d.save;
    assertEqual(exist('test_file.table'),2);
    delete('test_file.table');
end
        