i am testing a method in which a ResourceBundle object fetches some values from a .properties file. The property file is under resources/valuesFile.properties directly under my project's classpath .Below is how i am accessing the valuesFile.properties file ,
ResourceBundle bundle = ResourceBundle.getBundle("valuesFile");
when i run the project it runs smoothly but when i run the test , it fails throwing a stack of exceptions .
Caused by: java.util.MissingResourceException: Can't find bundle for base name valuesfile, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1499)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1322)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:721)
...
Above is one of those exception. i am using Eclipse as IDE.