-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for processing step documentation properties
- Loading branch information
1 parent
540ba7b
commit b1632ea
Showing
6 changed files
with
42 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
classdef tStep < MAGAnalysisTestCase | ||
% TSTEP Unit tests for "mag.process.Step" classes. | ||
|
||
properties (TestParameter) | ||
StepClass = tStep.retrieveProcessingSteps() | ||
PropertyName = {"Name", "Description", "DetailedDescription"} | ||
end | ||
|
||
methods (Test) | ||
|
||
% Test that calling documentation properties on processing steps | ||
% does not throw. | ||
function documentationProperty(testCase, StepClass, PropertyName) | ||
|
||
% Set up. | ||
stepClass = feval(StepClass); | ||
|
||
% Exercise. | ||
documentation = stepClass.(PropertyName); | ||
|
||
% Verify. | ||
testCase.assertClass(documentation, "string", "Documentation property type should be ""string"".") | ||
testCase.verifyNotEmpty(documentation, "Documentation property value should not be empty."); | ||
end | ||
end | ||
|
||
methods (Static, Access = private) | ||
|
||
function classNames = retrieveProcessingSteps() | ||
|
||
metaPackage = meta.package.fromName("mag.process"); | ||
|
||
metaClass = metaPackage.ClassList; | ||
metaClass([metaClass.Abstract]) = []; | ||
|
||
classNames = {metaClass.Name}; | ||
end | ||
end | ||
end |