Skip to content

Instantly share code, notes, and snippets.

@youknowjack
Last active December 24, 2015 10:19
Show Gist options
  • Save youknowjack/6782938 to your computer and use it in GitHub Desktop.
Save youknowjack/6782938 to your computer and use it in GitHub Desktop.
import com.indeed.proctor.common.*;
import com.indeed.proctor.common.model.*;
import javax.el.FunctionMapper;
...
public Proctor loadProctor(final String definitionFile) throws MissingTestMatrixException, IOException {
final String specPath = "/org/example/proctor/ExampleGroups.json";
final ProctorSpecification spec = ProctorUtils.readSpecification(getClass().getResourceAsStream(specPath));
final FunctionMapper functionMapper = RuleEvaluator.defaultFunctionMapperBuilder().build();
final FileProctorLoader loader = new FileProctorLoader(spec, definitionFile, functionMapper);
final Proctor proctor = loader.doLoad();
return proctor;
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment