public void regenTest( CodeGenerationContext codeGenContext, DeclarationContext declarationContext, UsageContext usageContext, String... usesStatements) throws IOException { ClassFileGenerator cfg = codeGenContext.createGosuClassFileGenerator( determineClassName(declarationContext, usageContext)); cfg.setSuperClass(getTestBaseClass()); for (String usesStatement : usesStatements) { cfg.addUses(usesStatement); } codeGenContext.setCurrentTestGenerator(cfg); for (Member member : declarationContext.getMembers()) { if (usageContext.isApplicable(member)) { createTestUsage(usageContext, codeGenContext, member); } } }
public void createTestUsage( UsageContext usageContext, CodeGenerationContext codeGenContext, Member member) { for (EvaluationMethod method : usageContext.getEvaluationMethods(member)) { method.getTestMethodStyle().generateTest(codeGenContext, usageContext, member, method); } }