Examples of ClusteredTweetEntity


Examples of info.archinnov.achilles.test.integration.entity.ClusteredTweetEntity

    UUID tweetId = UUIDGen.getTimeUUID();
    Date creationDate = new Date();

    ClusteredTweetId id = new ClusteredTweetId(userId, tweetId, creationDate);

    ClusteredTweetEntity tweet = new ClusteredTweetEntity(id, "this is a tweet", userId, false);

    manager.insert(tweet);

    ClusteredTweetEntity found = manager.find(ClusteredTweetEntity.class, id);

    assertThat(found.getContent()).isEqualTo("this is a tweet");
    assertThat(found.getOriginalAuthorId()).isEqualTo(userId);
    assertThat(found.getIsARetweet()).isFalse();
  }
View Full Code Here

Examples of info.archinnov.achilles.test.integration.entity.ClusteredTweetEntity

    UUID tweetId = UUIDGen.getTimeUUID();
    Date creationDate = new Date();

    ClusteredTweetId id = new ClusteredTweetId(userId, tweetId, creationDate);

    ClusteredTweetEntity tweet = new ClusteredTweetEntity(id, "this is a tweet", userId, false);
    tweet = manager.insert(tweet);

    tweet.setContent("this is a new tweet2");
    tweet.setIsARetweet(true);
    tweet.setOriginalAuthorId(originalAuthorId);

    manager.update(tweet);

    ClusteredTweetEntity found = manager.find(ClusteredTweetEntity.class, id);

    assertThat(found.getContent()).isEqualTo("this is a new tweet2");
    assertThat(found.getOriginalAuthorId()).isEqualTo(originalAuthorId);
    assertThat(found.getIsARetweet()).isTrue();
  }
View Full Code Here

Examples of info.archinnov.achilles.test.integration.entity.ClusteredTweetEntity

    UUID tweetId = UUIDGen.getTimeUUID();
    Date creationDate = new Date();

    ClusteredTweetId id = new ClusteredTweetId(userId, tweetId, creationDate);

    ClusteredTweetEntity tweet = new ClusteredTweetEntity(id, "this is a tweet", userId, false);

    tweet = manager.insert(tweet);

    manager.delete(tweet);

    ClusteredTweetEntity found = manager.find(ClusteredTweetEntity.class, id);

    assertThat(found).isNull();
  }
View Full Code Here

Examples of info.archinnov.achilles.test.integration.entity.ClusteredTweetEntity

    UUID tweetId = UUIDGen.getTimeUUID();
    Date creationDate = new Date();

    ClusteredTweetId id = new ClusteredTweetId(userId, tweetId, creationDate);

    ClusteredTweetEntity tweet = new ClusteredTweetEntity(id, "this is a tweet", userId, false);

    tweet = manager.insert(tweet);

    session.execute("update " + CLUSTERED_TWEET_TABLE + " set content='New tweet',original_author_id="
        + originalAuthorId + ",is_a_retweet=true where user_id=" + userId + " and tweet_id=" + tweetId
        + " and creation_date=" + creationDate.getTime());

    Thread.sleep(100);

    manager.refresh(tweet);

    assertThat(tweet.getContent()).isEqualTo("New tweet");
    assertThat(tweet.getOriginalAuthorId()).isEqualTo(originalAuthorId);
    assertThat(tweet.getIsARetweet()).isTrue();
  }
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.