Test Structure |
Top Previous Next |
Isolator++ Professional supports the AAA (arrange-act-assert) style of unit tests, where a test looks like this:
One extra step is needed: calling ISOLATOR_CLEANUP at the end of each unit test. The best place to add this is in the teardown method Keeping a consistent structure allows the tests to be more readable to casual readers or new developers on your team.
GTest
class MyTests: public ::testing::Test { public: virtual void TearDown() { ISOLATOR_CLEANUP(); } };
MSTest
TEST_CLASS(Conditional) { public: TEST_METHOD_CLEANUP(TearDown) { ISOLATOR_CLEANUP(); }
|
Copyright Typemock Ltd. 2009-2025. All Rights Reserved.