Package org.rssowl.core.model.preferences

Examples of org.rssowl.core.model.preferences.IPreferencesScope


    IBookMark bookmark = (IBookMark) folder.getMarks().get(0);
    assertEquals(103, countNews(feed));

    /* Preferences */
    IPreferencesScope prefs1 = NewsModel.getDefault().getEntityScope(bookmark);

    /* Setup Retention */
    prefs1.putBoolean(DefaultPreferences.DEL_NEWS_BY_AGE_STATE, true);

    /* Run and Validate Retention */
    prefs1.putInteger(DefaultPreferences.DEL_NEWS_BY_AGE_VALUE, 5);
    assertEquals(true, RetentionStrategy.process(bookmark, feed, -1));
    assertEquals(2, countNews(feed));
  }
View Full Code Here


    IBookMark bookmark = (IBookMark) folder.getMarks().get(0);
    assertEquals(103, countNews(feed));

    /* Preferences */
    IPreferencesScope prefs1 = NewsModel.getDefault().getEntityScope(bookmark);

    /* Setup Retention */
    prefs1.putBoolean(DefaultPreferences.DEL_NEWS_BY_COUNT_STATE, true);

    /* Run and Validate Retention */
    prefs1.putInteger(DefaultPreferences.DEL_NEWS_BY_COUNT_VALUE, 50);
    assertEquals(true, RetentionStrategy.process(bookmark, feed, -1));
    assertEquals(50, countNews(feed));
  }
View Full Code Here

    IBookMark bookmark = (IBookMark) folder.getMarks().get(0);
    assertEquals(103, countNews(feed));

    /* Preferences */
    IPreferencesScope prefs1 = NewsModel.getDefault().getEntityScope(bookmark);

    /* Setup Retention */
    prefs1.putBoolean(DefaultPreferences.DEL_NEWS_BY_COUNT_STATE, true);

    /* Run and Validate Retention */
    prefs1.putInteger(DefaultPreferences.DEL_NEWS_BY_COUNT_VALUE, 50);
    assertEquals(true, RetentionStrategy.process(bookmark, feed, 60));
    assertEquals(60, countNews(feed));
  }
View Full Code Here

    IBookMark bookmark = (IBookMark) folder.getMarks().get(0);
    assertEquals(103, countNews(feed));

    /* Preferences */
    IPreferencesScope prefs1 = NewsModel.getDefault().getEntityScope(bookmark);

    /* Setup Retention */
    prefs1.putBoolean(DefaultPreferences.DEL_READ_NEWS_STATE, true);

    /* Run and Validate Retention */
    assertEquals(true, RetentionStrategy.process(bookmark, feed, -1));
    assertEquals(82, countNews(feed));
  }
View Full Code Here

    IBookMark bookmark = (IBookMark) folder.getMarks().get(0);
    assertEquals(103, countNews(feed));

    /* Preferences */
    IPreferencesScope prefs1 = NewsModel.getDefault().getEntityScope(bookmark);

    /* Setup Retention */
    prefs1.putBoolean(DefaultPreferences.DEL_NEWS_BY_AGE_STATE, true);
    prefs1.putBoolean(DefaultPreferences.DEL_NEWS_BY_COUNT_STATE, true);

    /* Run and Validate Retention */
    prefs1.putInteger(DefaultPreferences.DEL_NEWS_BY_AGE_VALUE, 5);
    prefs1.putInteger(DefaultPreferences.DEL_NEWS_BY_COUNT_VALUE, 50);
    assertEquals(true, RetentionStrategy.process(bookmark, feed, -1));
    assertEquals(2, countNews(feed));
  }
View Full Code Here

    IBookMark bookmark = (IBookMark) folder.getMarks().get(0);
    assertEquals(103, countNews(feed));

    /* Preferences */
    IPreferencesScope prefs1 = NewsModel.getDefault().getEntityScope(bookmark);

    /* Setup Retention */
    prefs1.putBoolean(DefaultPreferences.DEL_NEWS_BY_AGE_STATE, true);
    prefs1.putBoolean(DefaultPreferences.DEL_READ_NEWS_STATE, true);

    /* Run and Validate Retention */
    prefs1.putInteger(DefaultPreferences.DEL_NEWS_BY_AGE_VALUE, 5);
    assertEquals(true, RetentionStrategy.process(bookmark, feed, -1));
    assertEquals(1, countNews(feed));
  }
View Full Code Here

    IBookMark bookmark = (IBookMark) folder.getMarks().get(0);
    assertEquals(103, countNews(feed));

    /* Preferences */
    IPreferencesScope prefs1 = NewsModel.getDefault().getEntityScope(bookmark);

    /* Setup Retention */
    prefs1.putBoolean(DefaultPreferences.DEL_NEWS_BY_COUNT_STATE, true);
    prefs1.putBoolean(DefaultPreferences.DEL_READ_NEWS_STATE, true);

    /* Run and Validate Retention */
    prefs1.putInteger(DefaultPreferences.DEL_NEWS_BY_COUNT_VALUE, 50);
    assertEquals(true, RetentionStrategy.process(bookmark, feed, -1));
    assertEquals(50, countNews(feed));
  }
View Full Code Here

    IBookMark bookmark = (IBookMark) folder.getMarks().get(0);
    assertEquals(103, countNews(feed));

    /* Preferences */
    IPreferencesScope prefs1 = NewsModel.getDefault().getEntityScope(bookmark);

    /* Setup Retention */
    prefs1.putBoolean(DefaultPreferences.DEL_NEWS_BY_AGE_STATE, true);
    prefs1.putBoolean(DefaultPreferences.DEL_NEWS_BY_COUNT_STATE, true);
    prefs1.putBoolean(DefaultPreferences.DEL_READ_NEWS_STATE, true);

    /* Run and Validate Retention */
    prefs1.putInteger(DefaultPreferences.DEL_NEWS_BY_AGE_VALUE, 5);
    prefs1.putInteger(DefaultPreferences.DEL_NEWS_BY_COUNT_VALUE, 50);
    assertEquals(true, RetentionStrategy.process(bookmark, feed, -1));
    assertEquals(1, countNews(feed));
  }
View Full Code Here

TOP

Related Classes of org.rssowl.core.model.preferences.IPreferencesScope

Copyright © 2018 www.massapicom. 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.