public void InitialSetup() { _testClass = new TestClass(); _methodForGenerating = _testClass.GetType().GetMethod(nameof(TestClass.MethodForGenerating)); _methodForCaching = _testClass.GetType().GetMethod(nameof(TestClass.MethodForCaching)); _cachedCompiledMethod = _methodForCaching.Compile(); _cachedCompiledMethodWithInstance = _cachedCompiledMethod.WithInstance(_testClass); }