Permalink
Browse files

Force language because JUnit tests depend on english language strings

  • Loading branch information...
1 parent 92af417 commit 921606e35e077a31d55cba849fdc4c813b2c9870 @smmmo smmmo committed May 6, 2012
Showing with 11 additions and 3 deletions.
  1. +4 −0 pom.xml
  2. +7 −3 src/test/java/net/pms/test/RendererConfigurationTest.java
View
@@ -433,6 +433,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <!-- Force language because JUnit tests depend on english language strings -->
+ <argLine>-Duser.language=en</argLine>
+ </configuration>
<version>2.11</version>
</plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
@@ -25,6 +25,7 @@
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
@@ -48,9 +49,12 @@
@Before
public void setUp() {
- // Silence all log messages from the PMS code that is being tested
- LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
- context.reset();
+ // Silence all log messages from the PMS code that is being tested
+ LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
+ context.reset();
+
+ // Set locale to EN to ignore translations for renderers
+ Locale.setDefault(Locale.ENGLISH);
// Cases that are too generic should not match anything
testCases.put("User-Agent: UPnP/1.0 DLNADOC/1.50", null);

0 comments on commit 921606e

Please sign in to comment.