8.4. Sureassert Stubs with JUnit

When Sureassert runs your JUnits, you can add the @Stubs annotation to any JUnit test method to declare methods you want to stub. The stubs declaration works exactly the same as the stubs property within Exemplars; see the Test Isolation section for more details.

Note however that if you use the @Stubs annotation with a JUnit test, it will no longer be suitable for execution outside of the Sureassert testing context. Only leverage Sureassert stubs if the test is only to be used with Sureassert.

Previous Page   |   Next Page   |   Table of Contents

Comments are closed.