class libtmux-dotnet latest
TemporaryHierarchyScope
A server, session, window, and pane a test owns together.
Source and package
- Module
- LibTmux.Testing
- Package
- LibTmux
- Source
- src/LibTmux.Testing/TemporaryHierarchyScope.cs
-
Description#
Most tests want somewhere to type, which is four objects deep. Making them one at a time leaves a test holding four scopes and disposing them in the right order; one scope owns the lot and unwinds from the server, which takes everything inside it with it.
Discussed in Ownership and cleanup