-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSimulationModelTest.m
More file actions
40 lines (33 loc) · 1.56 KB
/
Copy pathSimulationModelTest.m
File metadata and controls
40 lines (33 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
% This test file was generated by Copilot. Validate generated output before use.
classdef SimulationModelTest < matlab.unittest.TestCase
properties
model
end
methods(TestMethodSetup)
function createModel(testCase)
testCase.model = SimulationModel();
end
end
methods(Test)
function testInitialValues(testCase)
testCase.verifyEqual(testCase.model.Kel0, testCase.model.SimFun.Parameters.Value(1));
testCase.verifyEqual(testCase.model.Kon0, testCase.model.SimFun.Parameters.Value(2));
testCase.verifyEqual(testCase.model.Kdeg0, testCase.model.SimFun.Parameters.Value(3));
testCase.verifyEqual(testCase.model.Duration0, 119);
testCase.verifyEqual(testCase.model.Interval0, testCase.model.DoseTable.Interval);
testCase.verifyEqual(testCase.model.Amount0, testCase.model.DoseTable.Amount);
end
function testSimulateMethod(testCase)
parameters = [0.1, 0.2, 0.3, 120, 50, 24]; % example parameters
testCase.model.simulate(parameters);
testCase.verifyNotEmpty(testCase.model.SimData);
testCase.verifyNotEmpty(testCase.model.SimDataTable);
end
function testROIsBetweenThresholds(testCase)
parameters = [0.1, 0.2, 0.3, 120, 50, 24]; % example parameters
testCase.model.simulate(parameters);
roiValue = testCase.model.ROIsBetweenThresholds;
testCase.verifyTrue(roiValue || ~roiValue); % should be a logical value
end
end
end