@Test public void testPropertyMerge() { MergeConfig cfg = ConfigFactory.create(MergeConfig.class); assertEquals("first", cfg.foo()); assertEquals("second", cfg.bar()); assertEquals("first", cfg.foo()); assertEquals("third", cfg.qux()); assertNull(cfg.quux()); assertEquals("theDefaultValue", cfg.fubar()); }
@Test(expected = UnsupportedOperationException.class) public void testWhenURLIsInvalid() { ConfigFactory.create(InvalidURLConfig.class); }
@Before public void before() { cfg = ConfigFactory.create(ArrayConfig.class); }