diff --git a/README.md b/README.md
index 8da932c..24d1e1b 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-[](https://github.com/simkaryote/MATLAB-SimBiology-DevOps-Workflow-Example/actions/workflows/ci.yml)
-[](https://simkaryote.github.io/MATLAB-SimBiology-DevOps-Workflow-Example/tests/)
-[](https://simkaryote.github.io/MATLAB-SimBiology-DevOps-Workflow-Example/coverage/)
+[](https://github.com/ChezJe/MATLAB-SimBiology-DevOps-Workflow/actions/workflows/ci.yml)
+[](https://ChezJe.github.io/MATLAB-SimBiology-DevOps-Workflow/tests/)
+[](https://ChezJe.github.io/MATLAB-SimBiology-DevOps-Workflow/coverage/)
# MATLAB®/SimBiology® DevOps Workflow Example
diff --git a/WorkshopGuide.md b/WorkshopGuide.md
index 9ea07c0..8554551 100644
--- a/WorkshopGuide.md
+++ b/WorkshopGuide.md
@@ -17,19 +17,19 @@ In this workshop, you will:
## Table of Contents
[Workshop Requirements](#H_34C2FB57)
- [Part 1: Getting the workshop files and configuring GitHub for automated testing and results publishing](#TMP_7781)
+ [Part 1: Getting the workshop files and configuring GitHub for automated testing and results publishing](#TMP_0858)
- [Part 2: Generating your first tests](#TMP_16c9)
+ [Part 2: Generating your first tests](#TMP_7685)
- [Part 3: Finding existing tests and measuring coverage](#TMP_20d9)
+ [Part 3: Finding existing tests and measuring coverage](#TMP_38e3)
- [Part 4: Updating badges, committing our changes, and pushing to GitHub](#TMP_4270)
+ [Part 4: Updating badges, committing our changes, and pushing to GitHub](#TMP_9e20)
- [Part 5: Create a pull request, watch GitHub Actions automatically test your changes and publish results](#TMP_513c)
+ [Part 5: Create a pull request, watch GitHub Actions automatically test your changes and publish results](#TMP_5a5c)
- [Part 6: Compile the App in the CI workflow and download the artifact](#TMP_28f0)
+ [Part 6: Compile the App in the CI workflow and download the artifact](#TMP_4618)
- [Workshop wrap\-up and additional information](#TMP_457b)
+ [Workshop wrap\-up and additional information](#TMP_5b6a)
@@ -54,7 +54,7 @@ The following steps cover all of the things you will need to successfully comple
- The workshop leverages the free repository and CI capabilities offered by GitHub and GitHub Actions
- Go to: [https://github.com/signup](https://github.com/signup)
-
+
# Part 1: Getting the workshop files and configuring GitHub for automated testing and results publishing
@@ -248,7 +248,7 @@ Click on the 'Run App' shortcut to start the app in MATLAB:

-
+
# Part 2: Generating your first tests
@@ -405,7 +405,7 @@ Congratulations! You just created multiple tests for your MATLAB code!
It was easier than you thought, right?
-
+
# Part 3: Finding existing tests and measuring coverage
@@ -645,7 +645,7 @@ It looks like we've achieved full statement coverage for [`generateSimFun`](./co

-
+
# Part 4: Updating badges, committing our changes, and pushing to GitHub
@@ -794,7 +794,7 @@ At this point, all of your changes will be pushed to GitHub.

-
+
# Part 5: Create a pull request, watch GitHub Actions automatically test your changes and publish results
@@ -904,7 +904,7 @@ The code coverage report looks like this:
Now anyone that visits your repository can immediately see the quality of your code, explore your test and code coverage results, and will have more confidence in the code you are writing!
-
+
# Part 6: Compile the App in the CI workflow and download the artifact
@@ -983,7 +983,7 @@ Once the `Deploy/ Release (main)` job is done, a new artifact is available at th
You can now download the CTF file and upload it to your Web App Server!
-
+
# Workshop wrap\-up and additional information
diff --git a/resources/project/Project.xml b/resources/project/Project.xml
index 99e8a0b..79405b2 100644
--- a/resources/project/Project.xml
+++ b/resources/project/Project.xml
@@ -145,6 +145,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/TestSimulationModel.m b/tests/TestSimulationModel.m
new file mode 100644
index 0000000..b4299ac
--- /dev/null
+++ b/tests/TestSimulationModel.m
@@ -0,0 +1,111 @@
+% This test file was generated by Copilot. Validate generated output before use.
+classdef TestSimulationModel < matlab.unittest.TestCase
+ % Unit tests for SimulationModel class.
+ %
+ % These tests assume that a MAT-file 'simFunction_Dose.mat' exists on the
+ % MATLAB path and contains variables 'simFun' and 'doseTable' compatible
+ % with SimulationModel constructor expectations.
+
+ properties
+ Model % instance of SimulationModel
+ end
+
+ methods(TestMethodSetup)
+ function createModel(testCase)
+ % Create a fresh instance for each test.
+ testCase.Model = SimulationModel();
+ end
+ end
+
+ methods(Test)
+ function testConstructorInitializesProperties(testCase)
+ % Verify constructor sets up essential properties and original values.
+ m = testCase.Model;
+
+ % SimFun and DoseTable should be non-empty
+ testCase.verifyNotEmpty(m.SimFun, 'SimFun should be loaded by constructor.');
+ testCase.verifyNotEmpty(m.DoseTable, 'DoseTable should be loaded by constructor.');
+
+ % Original parameter values should be numeric scalars
+ testCase.verifyGreaterThan(m.Kel0, 0);
+ testCase.verifyGreaterThan(m.Kon0, 0);
+ testCase.verifyGreaterThan(m.Kdeg0, 0);
+ testCase.verifyGreaterThan(m.Duration0, 0);
+ testCase.verifyGreaterThan(m.Interval0, 0);
+ testCase.verifyGreaterThan(m.Amount0, 0);
+ end
+
+ function testSimulateProducesSimDataAndTable(testCase)
+ % Calling simulate with default parameters should populate SimData and SimDataTable.
+ m = testCase.Model;
+
+ % Ensure no SimData before simulation
+ if ~isempty(m.SimDataTable)
+ % reset by creating a new instance if leftover data exists
+ m = SimulationModel();
+ testCase.Model = m;
+ end
+
+ % Run simulation with default parameters
+ m.simulate();
+
+ % SimData and SimDataTable should be set
+ testCase.verifyNotEmpty(m.SimData, 'SimData should be set after simulate.');
+ testCase.verifyNotEmpty(m.SimDataTable, 'SimDataTable should be set after simulate.');
+
+ % SimDataTable must contain Time and RO variables
+ testCase.verifyTrue(ismember('Time', m.SimDataTable.Properties.VariableNames), ...
+ 'SimDataTable must contain Time column.');
+ testCase.verifyTrue(ismember('RO', m.SimDataTable.Properties.VariableNames), ...
+ 'SimDataTable must contain RO column produced by simFun.');
+
+ % Dose column should exist and have NaNs except dosing times
+ testCase.verifyTrue(ismember('Dose', m.SimDataTable.Properties.VariableNames), ...
+ 'SimDataTable must contain Dose column.');
+ doseCol = m.SimDataTable.Dose;
+ testCase.verifySize(doseCol, [height(m.SimDataTable), 1]);
+ end
+
+ function testSimulateAppliesCustomParameters(testCase)
+ % Verify simulate updates DoseTable.Amount and Interval when custom parameters provided.
+ m = testCase.Model;
+
+ originalAmount = m.DoseTable.Amount;
+ originalInterval = m.DoseTable.Interval;
+
+ % choose positive custom parameters: [kel, kon, kdeg, duration, amount, interval]
+ customParams = [m.Kel0, m.Kon0, m.Kdeg0, m.Duration0, originalAmount*2, max(1, originalInterval)];
+
+ m.simulate(customParams);
+
+ testCase.verifyEqual(m.DoseTable.Amount, customParams(5), 'Dose amount should be updated.');
+ testCase.verifyEqual(m.DoseTable.Interval, customParams(6), 'Dose interval should be updated.');
+
+ % SimDataTable should reflect dosing times consistent with the provided interval
+ dosingTimes = customParams(6)*(0:customParams(4)/customParams(6));
+ % At least one dosing time should be present in Time column
+ hasDosing = any(ismember(m.SimDataTable.Time, dosingTimes));
+ testCase.verifyTrue(hasDosing, 'SimDataTable.Time should include dosing times for given interval.');
+ end
+
+ function testROIsBetweenThresholdsLogical(testCase)
+ % simulate then verify ROIsBetweenThresholds returns logical scalar.
+ m = testCase.Model;
+ m.simulate();
+
+ val = m.ROIsBetweenThresholds;
+ testCase.verifyClass(val, 'logical');
+ testCase.verifySize(val, [1,1]);
+ end
+
+ function testSimulateWithInvalidParametersRaises(testCase)
+ % Passing invalid (non-positive) parameters should trigger argument validation.
+ m = testCase.Model;
+
+ % Create invalid parameters with a non-positive entry
+ invalidParams = [m.Kel0, m.Kon0, -1*m.Kdeg0, m.Duration0, m.Amount0, m.Interval0];
+
+ testCase.verifyError(@() m.simulate(invalidParams), 'MATLAB:validators:mustBePositive');
+ end
+ end
+end
\ No newline at end of file
diff --git a/tests/tSimulateModel.m b/tests/tSimulateModel.m
new file mode 100644
index 0000000..c877fad
--- /dev/null
+++ b/tests/tSimulateModel.m
@@ -0,0 +1,18 @@
+% This is an autogenerated sample test for all
+classdef tSimulateModel < matlab.unittest.TestCase
+ methods (Test)
+ function testAll(testCase)
+ % Specify the inputs
+ sObj = SimulationModel;
+ sObj.simulate;
+
+ testCase.verifyClass(sObj.SimData, 'SimData');
+
+ import matlab.unittest.constraints.IsSameSetAs
+
+ testCase.verifyThat(sObj.SimData.DataNames,...
+ IsSameSetAs(["Drug","Complex","Receptor","RO"]));
+
+ end
+ end
+end
\ No newline at end of file
diff --git a/tests/tgenerateSimFun.m b/tests/tgenerateSimFun.m
index 1757746..15bc75f 100644
--- a/tests/tgenerateSimFun.m
+++ b/tests/tgenerateSimFun.m
@@ -6,7 +6,7 @@
end
properties (ClassSetupParameter)
- MATfilename = {"test_generateSimFun.mat"}
+ MATfilename = {"test_generateSimFun.mat", string.empty}
end
properties (TestParameter)