use of com.google.devtools.build.lib.exec.util.TestExecutorBuilder in project bazel by bazelbuild.
the class TemplateExpansionActionTest method testExpansion.
@Test
public void testExpansion() throws Exception {
Executor executor = new TestExecutorBuilder(directories, binTools).build();
create().execute(createContext(executor));
String content = new String(FileSystemUtils.readContentAsLatin1(output));
String expected = Joiner.on('\n').join("key=foo", "value=bar");
assertEquals(expected, content);
}
use of com.google.devtools.build.lib.exec.util.TestExecutorBuilder in project bazel by bazelbuild.
the class TemplateExpansionActionTest method executeTemplateExpansion.
private void executeTemplateExpansion(String expected, List<Substitution> substitutions) throws Exception {
Executor executor = new TestExecutorBuilder(directories, binTools).build();
createWithArtifact(substitutions).execute(createContext(executor));
String actual = FileSystemUtils.readContent(output, StandardCharsets.UTF_8);
assertThat(actual).isEqualTo(expected);
}
Aggregations