Skip to content

Commit 773c47f

Browse files
committed
engine factory is now supposed to create an engine which is ready to run (hence the method name change), #736
1 parent 9ce830c commit 773c47f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/BenchmarkDotNet.IntegrationTests/CustomEngineTests.cs

+8-2
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,18 @@ public void Empty() { }
5454

5555
public class CustomFactory : IEngineFactory
5656
{
57-
public IEngine CreateReadyToRun(EngineParameters engineParameters)
58-
=> new CustomEngine
57+
public IEngine CreateReadyToRun(EngineParameters engineParameters)
58+
{
59+
var engine = new CustomEngine
5960
{
6061
GlobalCleanupAction = engineParameters.GlobalCleanupAction,
6162
GlobalSetupAction = engineParameters.GlobalSetupAction
6263
};
64+
65+
engine.GlobalSetupAction?.Invoke(); // engine factory is now supposed to create an engine which is ready to run (hence the method name change)
66+
67+
return engine;
68+
}
6369
}
6470

6571
public class CustomEngine : IEngine

0 commit comments

Comments
 (0)