MATLAB: How to teardown fixture while using a TestCase obj in interactive mode

applyfixturefixtureforinteractiveuseMATLABtestcaseunittest

I found matlab.unittest.TestCase.forInteractiveUse extremely useful for development and debugging of test cases written for matlab.unittest.TestCase.
But if I use applyFixture method of a test method of such a TestCase obj that is in interattive mode by forInteractiveUse, how do I teardown the fixture? Simply deleting the TestCase won't does it, will it?
For example, say I have a TestCase class like this:
classdef testcase1 < matlab.unittest.TestCase
methods (Test)
function testmethod1(testCase)
testCase.applyFixture(thisfixture);
% blah, blah, blah
end
end
end
Then, for development, I excute the following command:
testCase = testcase1; testCase.forInteractiveUse;
Then I can evaluate anything within the TestCase just like a script. However, in case a test method uses matlab.unittest.fixtures.Fixture for setup, I would like to do this:
testCase.applyFixture(fixtureforthis);
Then I can comfortablly evaluate/debug the rest of code in the test method. My question is how can I get out of this state. How can I invoke teardown method of the fixture thisfixture while in interactive mode?

Best Answer

Actually, deletion of the testcase1 object testCase does invoke the teadown method. Thus, combinatory use of forInteractiveUse and appyFixture is very efficient.