Further unit tests: CFB and Delta
[cfb.git] / prod / net / jaekl / cfb / CfbBundle.java
index 5f5aa9ee8b52ce303cf45c623a8853800c32b1e4..b46b2905722a3eaaed88a054f2ed188b4a9405e1 100644 (file)
@@ -58,6 +58,11 @@ public class CfbBundle {
                m_bundle = QDBundleFactory.getInst().getBundle(BUNDLE_NAME, locale); 
        }
        
+       // This constructor is intended only for use during unit testing.
+       CfbBundle() {
+               m_bundle = null;
+       }
+       
        public String get(String key, Object... arguments) {
                try {
                        if (null != m_bundle) {
@@ -71,10 +76,15 @@ public class CfbBundle {
                        // Fall through to the fallback behaviour below
                }
                
+               return fallbackGet(key, arguments);
+       }
+       
+       String fallbackGet(String key, Object... arguments) {
                StringBuilder sb = new StringBuilder("[" + key + "]");
                for (Object obj : arguments) {
                        sb.append("[" + obj + "]");
                }
                return sb.toString();
+               
        }
 }