db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1870545 - /db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/util/LargeSelectTest.java
Date Thu, 28 Nov 2019 09:34:01 GMT
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());
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message