- edited description
Add a live template for Test.start/stopTest() with a braced block between
Issue #1088
resolved
I think this is something that quite a few people would appreciate....a new Apex live template, tst
, that results in the following:
Test.startTest();
{
<cursor-lands-here>
}
Test.stopTest();
Even thought the added scope is artificial, it does two things: 1) it visually distinguishes the system-under-test logic via indentation; 2) it provides a new semantic scope for the system-under-test logic. The only real down-side is that if you want access to any variable assigned in that block, you would need to have been declared it before the block.
This should also work as for surround with behavior.
Comments (2)
-
reporter -
reporter - changed status to resolved
Delivered in 1.8.3.8 and 2.0.3.5.
- Log in to comment