Author: tv
Date: Thu Nov 28 09:34:00 2019
New Revision: 1870545
URL: http://svn.apache.org/viewvc?rev=1870545&view=rev
Log:
Better localization support for progress text
Modified:
db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/util/LargeSelectTest.java
Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/util/LargeSelectTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/util/LargeSelectTest.java?rev=1870545&r1=1870544&r2=1870545&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/util/LargeSelectTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/util/LargeSelectTest.java Thu Nov 28 09:34:00 2019
@@ -173,13 +173,19 @@ public class LargeSelectTest extends Bas
ls.setMemoryPageLimit(LargeSelect.DEFAULT_MEMORY_LIMIT_PAGES);
assertEquals("Memory page limit", 5, ls.getMemoryPageLimit());
- assertEquals("More indicator", ">", ls.getMoreIndicator());
- String newMoreIndicator = "more than";
- ls.setMoreIndicator(newMoreIndicator);
- assertEquals("More indicator", newMoreIndicator,
- ls.getMoreIndicator());
- ls.setMoreIndicator(LargeSelect.DEFAULT_MORE_INDICATOR);
- assertEquals("More indicator", ">", ls.getMoreIndicator());
+ assertEquals("Page progress text pattern", "{0} of {1,choice,0#> |1#}{2}", ls.getPageProgressTextPattern());
+ String newPageProgressTextPattern = "Seite {0} von {1,choice,0#mehr als |1#}{2}";
+ ls.setPageProgressTextPattern(newPageProgressTextPattern);
+ assertEquals("Page progress text pattern", newPageProgressTextPattern, ls.getPageProgressTextPattern());
+ ls.setPageProgressTextPattern(LargeSelect.DEFAULT_PAGE_PROGRESS_TEXT_PATTERN);
+ assertEquals("Page progress text pattern", "{0} of {1,choice,0#> |1#}{2}", ls.getPageProgressTextPattern());
+
+ assertEquals("Record progress text pattern", "{0} - {1} of {2,choice,0#> |1#}{3}", ls.getRecordProgressTextPattern());
+ String newRecordProgressTextPattern = "Datensätze {0} bis {1} von {2,choice,0#mehr als |1#}{3}";
+ ls.setRecordProgressTextPattern(newRecordProgressTextPattern);
+ assertEquals("Record progress text pattern", newRecordProgressTextPattern, ls.getRecordProgressTextPattern());
+ ls.setRecordProgressTextPattern(LargeSelect.DEFAULT_RECORD_PROGRESS_TEXT_PATTERN);
+ assertEquals("Record progress text pattern", "{0} - {1} of {2,choice,0#> |1#}{3}", ls.getRecordProgressTextPattern());
}
/**
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.