Package de.jetwick.util

Examples of de.jetwick.util.MyDate.minusHours()


    public void testSuggestFilterRemoval() {
        MyDate md = new MyDate();
        twSearch.testUpdate(Arrays.asList(
                createTweet(1L, "RT @user3: test this first tweet", "peter").setCreatedAt(md.toDate()),
                createTweet(2L, "test others", "peter2").setCreatedAt(md.toDate()),
                createTweet(3L, "testnot this", "peter3").setCreatedAt(md.minusHours(2).toDate()),
                createTweet(4L, "test this", "peter4").setCreatedAt(md.toDate())));

        JetwickQuery q = new TweetQuery(false).addIsOriginalTweetFilter().
                addLatestDateFilter(1).
                addUserFilter("peter");
View Full Code Here


    public void testSuggestFilterRemoval2() {
        MyDate md = new MyDate();
        twSearch.testUpdate(Arrays.asList(
                createTweet(1L, "RT @user3: test this first tweet", "peter1").setCreatedAt(md.toDate()),
                createTweet(2L, "test others", "peter2").setCreatedAt(md.toDate()),
                createTweet(3L, "testnot this", "peter3").setCreatedAt(md.minusHours(2).toDate()),
                createTweet(4L, "test this", "peter4").setCreatedAt(md.toDate())));

        JetwickQuery q = new TweetQuery(false).addIsOriginalTweetFilter().
                addLatestDateFilter(1).
                addUserFilter("peter");
View Full Code Here

    @Test
    public void testSuggestFilterForceDate() {
        MyDate md = new MyDate();
        twSearch.testUpdate(Arrays.asList(
                createTweet(2L, "test others", "peter2").setCreatedAt(md.minusHours(2).toDate()),
                createTweet(3L, "testnot this", "peter3").setCreatedAt(md.minusHours(2).toDate())));

        JetwickQuery q = new TweetQuery(false).addLatestDateFilter(1);
        Collection<String> keys = twSearch.suggestRemoval(q);
        assertEquals(1, keys.size());
View Full Code Here

    @Test
    public void testSuggestFilterForceDate() {
        MyDate md = new MyDate();
        twSearch.testUpdate(Arrays.asList(
                createTweet(2L, "test others", "peter2").setCreatedAt(md.minusHours(2).toDate()),
                createTweet(3L, "testnot this", "peter3").setCreatedAt(md.minusHours(2).toDate())));

        JetwickQuery q = new TweetQuery(false).addLatestDateFilter(1);
        Collection<String> keys = twSearch.suggestRemoval(q);
        assertEquals(1, keys.size());
        Iterator<String> iter = keys.iterator();
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.