Examples of Preference


Examples of rabbit.ui.Preference

  private Preference preference; // Test subject.

  @Before
  public void setUp() {
    preference = new Preference();
  }
View Full Code Here

Examples of rabbit.ui.Preference

  @Test
  public void testUpdate_checkDates() throws Exception {
    RabbitView view = new RabbitView();
    view.createPartControl(shell);

    Preference pref = getPreference(view);

    Calendar fromDate = new GregorianCalendar(1999, 1, 1);
    pref.getStartDate().setTimeInMillis(fromDate.getTimeInMillis());

    Calendar toDate = new GregorianCalendar(2010, 1, 1);
    pref.getEndDate().setTimeInMillis(toDate.getTimeInMillis());

    update(view);

    assertEquals(fromDate.get(Calendar.YEAR), pref.getStartDate().get(
        Calendar.YEAR));
    assertEquals(fromDate.get(Calendar.MONTH), pref.getStartDate().get(
        Calendar.MONTH));
    assertEquals(fromDate.get(Calendar.DAY_OF_MONTH), pref.getStartDate().get(
        Calendar.DAY_OF_MONTH));

    assertEquals(toDate.get(Calendar.YEAR), pref.getEndDate()
        .get(Calendar.YEAR));
    assertEquals(toDate.get(Calendar.MONTH), pref.getEndDate().get(
        Calendar.MONTH));
    assertEquals(toDate.get(Calendar.DAY_OF_MONTH), pref.getEndDate().get(
        Calendar.DAY_OF_MONTH));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.