@Test public void testReadFromSourceTextUnitsWithoutPluralForms() { mapper = new AndroidStringDocumentMapper("_", assetDelimiter); textUnits.add(sourceTextUnitDTO(123L, "name0", "content0", "comment0", "my/path0", null, null)); textUnits.add(sourceTextUnitDTO(124L, "name1", "content1", "comment1", "my/path1", null, null)); document = mapper.readFromSourceTextUnits(textUnits); assertThat(document).isNotNull(); assertThat(document.getPlurals()).isEmpty(); assertThat(document.getSingulars()).hasSize(2); AndroidSingular singular1 = document.getSingulars().get(0); assertThat(singular1.getId()).isEqualTo(123L); assertThat(singular1.getName()).isEqualTo("my/path0#@#name0"); assertThat(singular1.getContent()).isEqualTo("content0"); assertThat(singular1.getComment()).isEqualTo("comment0"); AndroidSingular singular2 = document.getSingulars().get(1); assertThat(singular2.getId()).isEqualTo(124L); assertThat(singular2.getName()).isEqualTo("my/path1#@#name1"); assertThat(singular2.getContent()).isEqualTo("content1"); assertThat(singular2.getComment()).isEqualTo("comment1"); }
public AndroidStringDocument readFromSourceTextUnits(List<TextUnitDTO> textUnits) { return readFromTextUnits(textUnits, true); }
AndroidStringDocumentMapper { public AndroidStringDocument readFromSourceTextUnits(List<TextUnitDTO> textUnits) { return readFromTextUnits(textUnits, true); } }
AndroidStringDocumentMapper { public AndroidStringDocument readFromSourceTextUnits(List<TextUnitDTO> textUnits) { return readFromTextUnits(textUnits, true); } AndroidStringDocumentMapper(String pluralSeparator,
                                       String assetDelimiter,
                                       String locale,
                                       String repositoryName);  AndroidStringDocumentMapper(String pluralSeparator, String assetDelimiter); }
AndroidStringDocumentMapper { public AndroidStringDocument readFromSourceTextUnits(List<TextUnitDTO> textUnits) { return readFromTextUnits(textUnits, true); } 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 AndroidStringDocument readFromSourceTextUnits(List<TextUnitDTO> textUnits) { return readFromTextUnits(textUnits, true); } 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);  }