예제 #1
0
 @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());
 }
예제 #2
0
 @Test(expected = UnsupportedOperationException.class)
 public void testWhenURLIsInvalid() {
   ConfigFactory.create(InvalidURLConfig.class);
 }
예제 #3
0
 @Before
 public void before() {
   cfg = ConfigFactory.create(ArrayConfig.class);
 }