slub.team team mailing list archive
-
slub.team team
-
Mailing list archive
-
Message #00405
lp:~slub.team/goobi-production/fix-translation-dependend-unittests into lp:goobi-production
Ralf Claussnitzer has proposed merging lp:~slub.team/goobi-production/fix-translation-dependend-unittests into lp:goobi-production.
Requested reviews:
Henning Gerhardt (henning-gerhardt)
For more details, see:
https://code.launchpad.net/~slub.team/goobi-production/fix-translation-dependend-unittests/+merge/128053
--
https://code.launchpad.net/~slub.team/goobi-production/fix-translation-dependend-unittests/+merge/128053
Your team Saxon State Library Team is subscribed to branch lp:goobi-production.
=== modified file 'test/src/org/goobi/production/flow/statistics/enums/CalculationUnitTest.java'
--- test/src/org/goobi/production/flow/statistics/enums/CalculationUnitTest.java 2012-02-15 14:39:13 +0000
+++ test/src/org/goobi/production/flow/statistics/enums/CalculationUnitTest.java 2012-10-04 16:08:22 +0000
@@ -1,8 +1,33 @@
+/*
+ * This file is part of the Goobi Application - a Workflow tool for the support of
+ * mass digitization.
+ *
+ * Visit the websites for more information.
+ * - http://gdz.sub.uni-goettingen.de
+ * - http://www.goobi.org
+ * - http://launchpad.net/goobi-production
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+ * Suite 330, Boston, MA 02111-1307 USA
+ */
+
package org.goobi.production.flow.statistics.enums;
-import static org.junit.Assert.*;
+import de.sub.goobi.helper.Messages;
+
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+
public class CalculationUnitTest{
@Test
@@ -14,10 +39,10 @@
}
@Test
- public final void testGetTitle() {
- assertEquals("volumes",CalculationUnit.volumes.getTitle());
- assertEquals("pages",CalculationUnit.pages.getTitle());
- assertEquals("volumesAndPages",CalculationUnit.volumesAndPages.getTitle());
+ public final void shouldReturnTranslatedTitle() {
+ assertEquals(Messages.getString("volumes"), CalculationUnit.volumes.getTitle());
+ assertEquals(Messages.getString("pages"), CalculationUnit.pages.getTitle());
+ assertEquals(Messages.getString("volumesAndPages"), CalculationUnit.volumesAndPages.getTitle());
}
@Test
=== modified file 'test/src/org/goobi/production/flow/statistics/enums/ResultOutputTest.java'
--- test/src/org/goobi/production/flow/statistics/enums/ResultOutputTest.java 2012-02-15 14:39:13 +0000
+++ test/src/org/goobi/production/flow/statistics/enums/ResultOutputTest.java 2012-10-04 16:08:22 +0000
@@ -1,10 +1,33 @@
+/*
+ * This file is part of the Goobi Application - a Workflow tool for the support of
+ * mass digitization.
+ *
+ * Visit the websites for more information.
+ * - http://gdz.sub.uni-goettingen.de
+ * - http://www.goobi.org
+ * - http://launchpad.net/goobi-production
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+ * Suite 330, Boston, MA 02111-1307 USA
+ */
+
package org.goobi.production.flow.statistics.enums;
-import static org.junit.Assert.*;
-
+import de.sub.goobi.helper.Messages;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+
public class ResultOutputTest{
@Test
@@ -15,10 +38,10 @@
}
@Test
- public final void testGetTitle() {
- assertEquals("chart",ResultOutput.chart.getTitle());
- assertEquals("table",ResultOutput.table.getTitle());
- assertEquals("chartAndTable",ResultOutput.chartAndTable.getTitle());
+ public final void shouldReturnTranslatedTitle() {
+ assertEquals(Messages.getString("chart") ,ResultOutput.chart.getTitle());
+ assertEquals(Messages.getString("table") ,ResultOutput.table.getTitle());
+ assertEquals(Messages.getString("chartAndTable") ,ResultOutput.chartAndTable.getTitle());
}
@Test
=== modified file 'test/src/org/goobi/production/flow/statistics/enums/StatisticsModeTest.java'
--- test/src/org/goobi/production/flow/statistics/enums/StatisticsModeTest.java 2012-02-15 14:39:13 +0000
+++ test/src/org/goobi/production/flow/statistics/enums/StatisticsModeTest.java 2012-10-04 16:08:22 +0000
@@ -1,5 +1,29 @@
+/*
+ * This file is part of the Goobi Application - a Workflow tool for the support of
+ * mass digitization.
+ *
+ * Visit the websites for more information.
+ * - http://gdz.sub.uni-goettingen.de
+ * - http://www.goobi.org
+ * - http://launchpad.net/goobi-production
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+ * Suite 330, Boston, MA 02111-1307 USA
+ */
+
package org.goobi.production.flow.statistics.enums;
+import de.sub.goobi.helper.Messages;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
@@ -16,13 +40,13 @@
}
@Test
- public final void testGetTitle() {
- assertEquals("runtimeOfSteps", StatisticsMode.SIMPLE_RUNTIME_STEPS.getTitle());
- assertEquals("productionThroughput", StatisticsMode.THROUGHPUT.getTitle());
- assertEquals("errorTracking", StatisticsMode.CORRECTIONS.getTitle());
- assertEquals("storageCalculator", StatisticsMode.STORAGE.getTitle());
- assertEquals("productionStatistics", StatisticsMode.PRODUCTION.getTitle());
- assertEquals("projectAssociation", StatisticsMode.PROJECTS.getTitle());
+ public final void shouldReturnTranslatedTitle() {
+ assertEquals(Messages.getString("runtimeOfSteps"), StatisticsMode.SIMPLE_RUNTIME_STEPS.getTitle());
+ assertEquals(Messages.getString("productionThroughput"), StatisticsMode.THROUGHPUT.getTitle());
+ assertEquals(Messages.getString("errorTracking"), StatisticsMode.CORRECTIONS.getTitle());
+ assertEquals(Messages.getString("storageCalculator"), StatisticsMode.STORAGE.getTitle());
+ assertEquals(Messages.getString("productionStatistics"), StatisticsMode.PRODUCTION.getTitle());
+ assertEquals(Messages.getString("projectAssociation"), StatisticsMode.PROJECTS.getTitle());
}
@Test
Follow ups