Exemplo n.º 1
0
 @Test
 public void testGetPathToOutput() {
   AndroidBuildConfig buildConfig = createSimpleBuildConfigRule();
   assertEquals(
       BuckConstant.GEN_PATH.resolve("java/com/example/__build_config__/BuildConfig.java"),
       buildConfig.getPathToOutput());
 }
Exemplo n.º 2
0
 @Test
 public void testBuildInternal() throws IOException {
   AndroidBuildConfig buildConfig = createSimpleBuildConfigRule();
   List<Step> steps =
       buildConfig.getBuildSteps(FakeBuildContext.NOOP_CONTEXT, new FakeBuildableContext());
   Step generateBuildConfigStep = steps.get(1);
   GenerateBuildConfigStep expectedStep =
       new GenerateBuildConfigStep(
           new FakeProjectFilesystem(),
           /* source */ BuildTargetFactory.newInstance("//java/com/example:build_config"),
           /* javaPackage */ "com.example",
           /* useConstantExpressions */ false,
           /* constants */ Suppliers.ofInstance(BuildConfigFields.empty()),
           BuckConstant.GEN_PATH.resolve("java/com/example/__build_config__/BuildConfig.java"));
   assertEquals(expectedStep, generateBuildConfigStep);
 }