Class: matlab.unittest.parameters.Parameter
Package: matlab.unittest.parameters
Create parameters from data
param = matlab.unittest.parameters.Parameter.fromData(
creates an array of prop
,nameVal
)Parameter
instances where prop
defines the parameterizing property name for all Parameter
elements and
nameVal
defines the name and value for each Parameter
element.
Using fromData
is analogous to defining parameters within a class-based
test using a properties
block. For
example:
properties (TestParameter) prop = nameVal end
fromData
you can redefine existing test parameters from outside the
test class.Use the fromData
method to redefine parameters defined in the
TestParameter
, MethodSetupParameter
, or
ClassSetupParameter
properties
block of a parameterized test.
param = matlab.unittest.parameters.Parameter.fromData(prop1,nameVal1,...,propN,nameValN)
defines Parameter
instances with multiple parameterizing property
names.