private static string MemberBlockFromPrototypeTest(ModuleBodyElementDeclaration mbed, MemberBlockFromPrototypeTestParams testParams) => CreateCodeBuilder().BuildMemberBlockFromPrototype(mbed, testParams.Content, testParams.Accessibility, testParams.NewIdentifier);
private string ParseAndTest <T>(string inputCode, string targetIdentifier, DeclarationType declarationType, MemberBlockFromPrototypeTestParams testParams, Func <T, MemberBlockFromPrototypeTestParams, string> theTest) { var vbe = MockVbeBuilder.BuildFromSingleStandardModule(inputCode, out _).Object; var state = MockParser.CreateAndParse(vbe); using (state) { var target = state.DeclarationFinder.DeclarationsWithType(declarationType) .Where(d => d.IdentifierName == targetIdentifier).OfType <T>() .Single(); return(theTest(target, testParams)); } }