Exemplo n.º 1
0
  public void test_getOrderByFields() throws Exception {
    Preferences pref = PreferencesForTesting.buildPreferences();
    assertEquals(0, pref.getOrderByFields().length);

    PreferencesForTesting prefWithOrderBy =
        new PreferencesForTesting() {
          @Override
          public OrderByField[] getOrderByFields() {
            return new OrderByField[] {
              new OrderByField("AP_FOO", "COL1"),
              new OrderByField("PM_TOTO", "COL2"),
              new OrderByField("AP_PIPO", "COLOSCOPIE")
            };
          }
        };

    AssertUtil.assertEquals(
        new OrderByField[] {
          new OrderByField("AP_FOO", "COL1"),
          new OrderByField("PM_TOTO", "COL2"),
          new OrderByField("AP_PIPO", "COLOSCOPIE")
        },
        prefWithOrderBy.getConfig().getOrderByFields());
  }
Exemplo n.º 2
0
 public void test_getConfig() throws Exception {
   PreferencesForTesting pref = new PreferencesForTesting();
   assertNotNull(pref.getConfig());
   assertSame(pref.getConfig(), pref.getConfig());
 }