Foundry tests are Solidity contracts. `setUp()` runs before each test, and cheatcodes such as `vm.prank`, `vm.warp` and `vm.expectRevert` control the environment.
function testFuzz_Stake(uint96 amt) public {
vm.assume(amt > 0);
vm.prank(alice);
staking.stake(amt);
assertEq(staking.balanceOf(alice), amt);
}Any parameterised test is fuzzed automatically; add invariant tests for properties that must hold after any sequence of calls.