org.unitils.util
Class ResourcebundleCheck

java.lang.Object
  extended by org.unitils.util.ResourcebundleCheck

public class ResourcebundleCheck
extends Object

ResourcebundleCheck: Checks if every key has a value in every locale.

Since:
3.4
Author:
Willemijn Wouters

Constructor Summary
ResourcebundleCheck()
           
 
Method Summary
static void testAllTheKeys(String bundleName, Locale... locales)
          The ResoucebundleCheck checks if the bundle exists for all the locale's and if keys exists for every bundle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourcebundleCheck

public ResourcebundleCheck()
Method Detail

testAllTheKeys

public static void testAllTheKeys(String bundleName,
                                  Locale... locales)
                           throws Exception
The ResoucebundleCheck checks if the bundle exists for all the locale's and if keys exists for every bundle. It checks all the keys and it throws an Exception when one of the exceptions isn't found. An MissingResourceException is thrown when a bundle can't be found (this happens only when their is no default resourcebundle).

Parameters:
bundleName -
locales -
Throws:
Exception


Copyright © 2014. All Rights Reserved.