@Test public void testMapToTextUnitsFromSingularsDocument() { mapper = new AndroidStringDocumentMapper("", assetDelimiter); document = new AndroidStringDocument(); document.addSingular(new AndroidSingular(10L, "string/path1#@#name1", "content1", "comment1")); document.addSingular(new AndroidSingular(11L, "string/path2#@#name2", "content2", "comment2")); textUnits = mapper.mapToTextUnits(document); assertThat(textUnits).isNotEmpty(); assertThat(textUnits).hasSize(2); assertThat(textUnits).extracting("tmTextUnitId", "name", "assetPath", "target") .contains(Tuple.tuple(10L, "name1", "string/path1", "content1")) .contains(Tuple.tuple(11L, "name2", "string/path2", "content2")); }
public List<TextUnitDTO> mapToTextUnits(AndroidStringDocument document) { return mapToTextUnitStream(document).collect(Collectors.toList()); }
AndroidStringDocumentMapper { public List<TextUnitDTO> mapToTextUnits(AndroidStringDocument document) { return mapToTextUnitStream(document).collect(Collectors.toList()); } }
AndroidStringDocumentMapper { public List<TextUnitDTO> mapToTextUnits(AndroidStringDocument document) { return mapToTextUnitStream(document).collect(Collectors.toList()); } AndroidStringDocumentMapper(String pluralSeparator,
                                       String assetDelimiter,
                                       String locale,
                                       String repositoryName);  AndroidStringDocumentMapper(String pluralSeparator, String assetDelimiter); }
AndroidStringDocumentMapper { public List<TextUnitDTO> mapToTextUnits(AndroidStringDocument document) { return mapToTextUnitStream(document).collect(Collectors.toList()); } AndroidStringDocumentMapper(String pluralSeparator,
                                       String assetDelimiter,
                                       String locale,
                                       String repositoryName);  AndroidStringDocumentMapper(String pluralSeparator, String assetDelimiter); AndroidStringDocument readFromTextUnits(List<TextUnitDTO> textUnits, boolean useSource); AndroidStringDocument readFromSourceTextUnits(List<TextUnitDTO> textUnits); AndroidStringDocument readFromTargetTextUnits(List<TextUnitDTO> textUnits); List<TextUnitDTO> mapToTextUnits(AndroidStringDocument document); Stream<TextUnitDTO> mapToTextUnitStream(AndroidStringDocument document); }
AndroidStringDocumentMapper { public List<TextUnitDTO> mapToTextUnits(AndroidStringDocument document) { return mapToTextUnitStream(document).collect(Collectors.toList()); } AndroidStringDocumentMapper(String pluralSeparator,
                                       String assetDelimiter,
                                       String locale,
                                       String repositoryName);  AndroidStringDocumentMapper(String pluralSeparator, String assetDelimiter); AndroidStringDocument readFromTextUnits(List<TextUnitDTO> textUnits, boolean useSource); AndroidStringDocument readFromSourceTextUnits(List<TextUnitDTO> textUnits); AndroidStringDocument readFromTargetTextUnits(List<TextUnitDTO> textUnits); List<TextUnitDTO> mapToTextUnits(AndroidStringDocument document); Stream<TextUnitDTO> mapToTextUnitStream(AndroidStringDocument document);  }