Open KendrickAng opened 4 years ago
When an input is possible to be null
, it should be considered. For example, when testing a Java method that has an int
parameter, it is not possible for that input to be null
as Java would not allow null
for an int
input.
Does this mean that if it's an non-primitive object type, like String or Task etc, the only partitions are null
and not null
Does this mean that if it's an non-primitive object type, like String or Task etc, the only partitions are
null
andnot null
Testing would be much easier if that were the case :-)
not-null objects have state (i.e., attribute values), and can belong to different partitions based on the state. For example, a String object can be alpha-numeric or not alpha-numeric, a Person object can be sick or healthy and so on.
Good point. Thanks
Should null values be included in equivalence partitions, or are they trivial enough to exclude from EPs? When should we include, or exclude them?