--- /dev/null
+package net.jaekl.cfb;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class CfbBundleTest {
+
+ @Test
+ public void testFallbackGet() {
+ Object[][] data = {
+ { "hello", new Object[] {}, "[hello]" },
+ { "hello", new Object[] {"world"}, "[hello][world]"},
+ { null, new Object[] {}, "[null]" },
+ {
+ "the.quick.brown.fox",
+ new Object[] {"jumps.over", Integer.valueOf(1), "lazy", "dog"},
+ "[the.quick.brown.fox][jumps.over][1][lazy][dog]"
+ }
+ };
+
+ CfbBundleMock bundle = new CfbBundleMock();
+
+ for (Object[] datum : data) {
+ String key = (String)datum[0];
+ Object[] params = (Object[])datum[1];
+ String expected = (String)datum[2];
+ String actual = bundle.fallbackGet(key, params);
+ assertEquals(expected, actual);
+ }
+ }
+
+}