Skip to content
This repository has been archived by the owner on Feb 9, 2018. It is now read-only.

Force language because JUnit tests depend on english language strings #45

Merged
merged 1 commit into from
May 6, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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.-->
Expand Down
10 changes: 7 additions & 3 deletions src/test/java/net/pms/test/RendererConfigurationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -48,9 +49,12 @@ public class RendererConfigurationTest {

@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);
Expand Down