test_class.file: org.eclipse.winery.tools.copybaragenerator/src/test/java/org/eclipse/winery/tools/copybaragenerator/CopybaraGeneratorTest.java
test_class.identifier: CopybaraGeneratorTest
test_class.superclass: extends TestWithGitBackedRepository
test_case.body: @Test
      public void generatedConfigHasCorrectStrings() throws Exception {
          // we use the commit 4b218e6 instead of origin/plain, because the number of definitions changes fast
          this.setRevisionTo("4b218e6");
          CopybaraGenerator copybaraGenerator = new CopybaraGenerator();
          String config = copybaraGenerator.generateCopybaraConfigFile();
          assertEquals("urlOrigin = \"https://github.com/OpenTOSCA/tosca-definitions-internal.git\"\n" +
              "urlDestination = \"file:///tmp/copybara/tosca-definitions-public\"\n" +
              "core.workflow(\n" +
              "    name = \"default\",\n" +
              "    origin = git.origin(\n" +
              "        url = urlOrigin,\n" +
              "        ref = \"master\",\n" +
              "    ),\n" +
              "    destination = git.destination(\n" +
              "        url = urlDestination,\n" +
              "        fetch = \"master\",\n" +
              "        push = \"master\",\n" +
              "    ),\n" +
              "    authoring = authoring.pass_thru(\"OpenTOSCA Bot <opentosca@iaas.uni-stuttgart.de>\"),\n" +
              "    origin_files = glob([\"README.md\", \"LICENSE\", \"artifacttemplates/http%3A%2F%2Fplain.winery.opentosca.org%2Fartifacttemplates/ArtifactTemplateWithFilesAndSources-ArtifactTypeWithoutProperties/**\",\n" +
              "        \"artifacttemplates/http%3A%2F%2Fplain.winery.opentosca.org%2Fartifacttemplates/ArtifactTemplateWithoutAnyFiles-ArtifactTypeWithoutProperties/**\"]),\n" +
              "    destination_files = glob([\"**\"], exclude = [\"README_INTERNAL.md\"]),\n" +
              ")", config);
      }
test_case.class_method_signature: CopybaraGeneratorTest.generatedConfigHasCorrectStrings()
test_case.full_signature: @Test public void generatedConfigHasCorrectStrings()
test_case.identifier: generatedConfigHasCorrectStrings
test_case.invocations: setRevisionTo generateCopybaraConfigFile assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void generatedConfigHasCorrectStrings()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(CopybaraGenerator.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(CopybaraGenerator.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: repository
focal_class.modifier: private final
focal_class.original_string: private final IRepository repository;
focal_class.type: IRepository
focal_class.var_name: repository
focal_class.file: org.eclipse.winery.tools.copybaragenerator/src/main/java/org/eclipse/winery/tools/copybaragenerator/CopybaraGenerator.java
focal_class.identifier: CopybaraGenerator
focal_class.class_method_signature: CopybaraGenerator.CopybaraGenerator()
focal_class.full_signature: public  CopybaraGenerator()
focal_class.identifier: CopybaraGenerator
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  CopybaraGenerator()
focal_class.class_method_signature: CopybaraGenerator.CopybaraGenerator(IRepository repository)
focal_class.full_signature: public  CopybaraGenerator(IRepository repository)
focal_class.identifier: CopybaraGenerator
focal_class.modifiers: public
focal_class.parameters: (IRepository repository)
focal_class.signature:  CopybaraGenerator(IRepository repository)
focal_class.class_method_signature: CopybaraGenerator.generateOriginFilesConfig()
focal_class.full_signature: public String generateOriginFilesConfig()
focal_class.identifier: generateOriginFilesConfig
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String generateOriginFilesConfig()
focal_class.class_method_signature: CopybaraGenerator.generateCopybaraConfigFile()
focal_class.full_signature: public String generateCopybaraConfigFile()
focal_class.identifier: generateCopybaraConfigFile
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String generateCopybaraConfigFile()
focal_class.class_method_signature: CopybaraGenerator.generateCopybaraConfigFile(Path targetFile)
focal_class.full_signature: public void generateCopybaraConfigFile(Path targetFile)
focal_class.identifier: generateCopybaraConfigFile
focal_class.modifiers: public
focal_class.parameters: (Path targetFile)
focal_class.return: void
focal_class.signature: void generateCopybaraConfigFile(Path targetFile)
focal_method.body: public String generateCopybaraConfigFile() {
          StringJoiner copybaraConfig = new StringJoiner("\n");
          copybaraConfig.add("urlOrigin = \"https://github.com/OpenTOSCA/tosca-definitions-internal.git\"");
          copybaraConfig.add("urlDestination = \"file:///tmp/copybara/tosca-definitions-public\"");
          copybaraConfig.add("core.workflow(");
          copybaraConfig.add("    name = \"default\",");
          copybaraConfig.add("    origin = git.origin(");
          copybaraConfig.add("        url = urlOrigin,");
          copybaraConfig.add("        ref = \"master\",");
          copybaraConfig.add("    ),");
          copybaraConfig.add("    destination = git.destination(");
          copybaraConfig.add("        url = urlDestination,");
          copybaraConfig.add("        fetch = \"master\",");
          copybaraConfig.add("        push = \"master\",");
          copybaraConfig.add("    ),");
          copybaraConfig.add("    authoring = authoring.pass_thru(\"OpenTOSCA Bot <opentosca@iaas.uni-stuttgart.de>\"),");
          copybaraConfig.add("    " + generateOriginFilesConfig());
          copybaraConfig.add("    destination_files = glob([\"**\"], exclude = [\"README_INTERNAL.md\"]),");
          copybaraConfig.add(")");
          return copybaraConfig.toString();
      }
focal_method.class_method_signature: CopybaraGenerator.generateCopybaraConfigFile()
focal_method.full_signature: public String generateCopybaraConfigFile()
focal_method.identifier: generateCopybaraConfigFile
focal_method.invocations: add add add add add add add add add add add add add add add generateOriginFilesConfig add add toString
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: String
focal_method.signature: String generateCopybaraConfigFile()