Skip to content

Commit d33cc7f

Browse files
committed
Describe the real Fixie setup in the No State found error
The message told users to inherit from VerifyTestProject, a type that does not exist in the package, the repo, or the docs. It fires exactly when a user has not wired Verify into Fixie yet, so it sent them looking for a base class that was never there. It now states the actual requirement: implement Fixie's ITestProject and IExecution, assign the target assembly, and wrap each run in ExecutionState.Set.
1 parent d731cfb commit d33cc7f

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/Verify.Fixie/Execution/ExecutionState.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ public static ExecutionState Current
2525

2626
throw new(
2727
"""
28-
No State found. Ensure a class inheriting from VerifyTestProject exists in the test project.
29-
public class TestProject :
30-
VerifyTestProject;
28+
No State found. Fixie leaves test execution up to the consumer, so Verify needs a class in the test project implementing Fixie's ITestProject and IExecution:
29+
* ITestProject.Configure must call VerifierSettings.AssignTargetAssembly(environment.Assembly)
30+
* IExecution.Run must wrap each test.Run in `using (ExecutionState.Set(testClass, test, parameters))`
31+
See https://github.com/VerifyTests/Verify/blob/main/docs/mdsource/fixie-convention.include.md for a full example.
3132
""");
3233
}
3334
}

0 commit comments

Comments
 (0)