Пример #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);
 }