Class ProtoTestAutoWrapAttribute
Opt-in low-ceremony mode: apply this attribute at assembly level and every xUnit v3 test in the assembly runs inside a ProtoTest execution context, exactly like a test carrying ProtoTestFactAttribute. A test that already carries a ProtoTest attribute keeps its own lifecycle and is not wrapped twice.
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
public sealed class ProtoTestAutoWrapAttribute : Attribute, IBeforeAfterTestAttribute
- Inheritance
-
ProtoTestAutoWrapAttribute
- Implements
-
IBeforeAfterTestAttribute
- Inherited Members
- Extension Methods
Examples
[assembly: ProtoTestAutoWrap]
[Fact]
public async Task PlainFactsGetAContext() => Assert.NotNull(Proto.Context);