use of com.facebook.buck.rules.macros.QueryOutputsMacroExpander in project buck by facebook.
the class QueryOutputsMacroExpanderTest method setUp.
@Before
public void setUp() throws Exception {
expander = new QueryOutputsMacroExpander(Optional.empty());
handler = new MacroHandler(ImmutableMap.of("query", expander));
filesystem = new FakeProjectFilesystem(tmp.getRoot());
cellNames = TestCellBuilder.createCellRoots(filesystem);
TargetNode<?, ?> depNode = JavaLibraryBuilder.createBuilder(BuildTargetFactory.newInstance(filesystem, "//exciting:dep"), filesystem).addSrc(Paths.get("Dep.java")).build();
TargetNode<?, ?> ruleNode = JavaLibraryBuilder.createBuilder(BuildTargetFactory.newInstance(filesystem, "//exciting:target"), filesystem).addSrc(Paths.get("Other.java")).addDep(depNode.getBuildTarget()).build();
TargetGraph targetGraph = TargetGraphFactory.newInstance(depNode, ruleNode);
ruleResolver = new BuildRuleResolver(targetGraph, new DefaultTargetNodeToBuildRuleTransformer());
dep = ruleResolver.requireRule(depNode.getBuildTarget());
rule = ruleResolver.requireRule(ruleNode.getBuildTarget());
}
Aggregations