Instead of using BadTestException
when an error occurs before running the Act (from within RunTest
method), the exception type for Inconclusive is used. This enables your Tests Runner to distinguish them from other failing tests.
Thus; for NUnit, this is NUnit.Framework.InconclusiveException
; for MSTests, this is Microsoft.VisualStudio.TestTools.UnitTesting.AssertInconclusiveException
and no such type exist for xUnit.
However, you can force any Exception type by setting SmartTest.InconclusiveExceptionType
property. Especially useful if you mix MSTests and NUnit tests...
A brand new example project with lots of explanations. Learn how to maximize Smart Tests usage.
Many enhancements:
Throw
Smart Assertion exist now. This enables you to ensure the expected exception is thrown and following Smart Assertions are done.- When an exception is thrown somewhere, we try to run all the
AfterAct
methods for which theBeforeAct
method was called. However, the first exception is reported. NotChangedExcept()
Smart Assertion method is renamedNotChangedExceptAct
to better reflect what is excepted.Optional
criteria added, with two values:Present
andAbsent
.- Act Result is now accessible from
Act<T>.Result
property. Making it accessible from within the Smart Assertion implementations.
And some bug fixes:
NotChangedAssertion
do not try to save/verify indexers.- No need to specify a Property Name when testing
NotRaised_PropertyChanged
. - Random generators for floating point numbers have better values, but is no more well distributed.
It's now possible to avoid generation of some values when generating random number from equivalence classes. Especially useful for tests of properties: when you change the property value, you do not want the actual value to be randomly chosen.
Criteria
can now be Ranges
of decimal
or DateTime
values.
For DateTime
values, you have to create the DateTime
instance with constant in the RunTest
statement.
Ensuring all possible values are tested.
To avoid name clash with System
ones (Double
, Enum
, Decimal
and DateTime
), I now use the System name with Range
suffix.
All previous notation is obsolete now.
Thus, SmartTest.Double.Range...
is now DoubleRange.Range...
.
For homogeneity, names with no conflicts use the same approach: Int.Range
is not Int32.Range
.
Case
can now be associated with parameter properties and fields and the equivalence class.
Ensuring better representation of which properties/fields and equivalence classes are involved in a test.
Case
can now be associated with parameter properties and fields.
Ensuring better representation of which properties/fields are involved in a test.
Criteria
can now be Enums
.
Ensuring all possible values are tested.
Criteria
can now be Ranges
of real values.
Ensuring all possible values are tested.
Criteria
can now be Ranges
of integer values.
Ensuring all possible values are tested.
SmartTests Visual Studio addin added.
None
Two new Smart Assertions:
Support for xUnit.
First version