Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

test case modified

  • Loading branch information...
commit 878d0597023534d72817d9421658dacc980a8e4a 1 parent 94b8966
xamry authored
11 src/test/java/com/impetus/kundera/examples/TwitterTestSuite.java
View
@@ -119,10 +119,10 @@ protected void addExternalLinks() {
*/
protected void addTweets() {
twitter.addTweet(userId1, "Here is my first tweet", "Web");
- twitter.addTweet(userId1, "Here is my second tweet", "Mobile");
+ twitter.addTweet(userId1, "Second Tweet from me", "Mobile");
- twitter.addTweet(userId2, "And here is first one from me", "Phone");
- twitter.addTweet(userId2, "Another one from me", "text");
+ twitter.addTweet(userId2, "Saurabh tweets for the first time", "Phone");
+ twitter.addTweet(userId2, "Another tweet from Saurabh", "text");
}
/**
@@ -151,6 +151,11 @@ protected void getAllTweets() {
assertNotNull(tweetsUser1);
assertNotNull(tweetsUser2);
+ assertFalse(tweetsUser1.isEmpty());
+ assertFalse(tweetsUser2.isEmpty());
+
+ assertEquals(2, tweetsUser1.size());
+ assertEquals(2, tweetsUser2.size());
}
/**
4 src/test/java/com/impetus/kundera/examples/query/CassandraQuerySuite.java
View
@@ -59,8 +59,8 @@ public void executeQuerySuite()
*/
public void getTweetsByBody()
{
- List<Tweet> user1Tweet = twitter.findTweetByBody("tweet");
- List<Tweet> user2Tweet = twitter.findTweetByBody("from me");
+ List<Tweet> user1Tweet = twitter.findTweetByBody("Here");
+ List<Tweet> user2Tweet = twitter.findTweetByBody("Saurabh");
assertNotNull(user1Tweet);
assertNotNull(user2Tweet);
assertEquals(1, user1Tweet.size());
14 src/test/java/com/impetus/kundera/examples/query/HBaseQuerySuite.java
View
@@ -53,7 +53,7 @@ protected void tearDownInternal() throws Exception
public void executeQuerySuite()
{
getTweetsByBody();
- //getTweetsByDevice();
+ getTweetsByDevice();
}
/**
* Gets the tweets by body.
@@ -62,13 +62,13 @@ public void executeQuerySuite()
*/
public void getTweetsByBody()
{
- List<Tweet> user1Tweet = twitter.findTweetByBody("first tweet");
- List<Tweet> user2Tweet = twitter.findTweetByBody("first one from me");
+ List<Tweet> user1Tweet = twitter.findTweetByBody("Here");
+ List<Tweet> user2Tweet = twitter.findTweetByBody("Saurabh");
assertNotNull(user1Tweet);
assertNotNull(user2Tweet);
- assertEquals(1, user1Tweet.size());
- assertEquals(1, user2Tweet.size());
+ assertEquals(2, user1Tweet.size());
+ assertEquals(2, user2Tweet.size());
}
/**
@@ -82,8 +82,8 @@ public void getTweetsByDevice()
List<Tweet> mobileTweets = twitter.findTweetByDevice("Mobile");
assertNotNull(webTweets);
assertNotNull(mobileTweets);
- assertEquals(1, webTweets.size());
- assertEquals(1, mobileTweets.size());
+ assertEquals(2, webTweets.size());
+ assertEquals(2, mobileTweets.size());
}
}
4 src/test/java/com/impetus/kundera/examples/query/MongoDBQuerySuite.java
View
@@ -62,8 +62,8 @@ public void executeQuerySuite()
*/
public void getTweetsByBody()
{
- List<Tweet> user1Tweet = twitter.findTweetByBody("first tweet");
- List<Tweet> user2Tweet = twitter.findTweetByBody("first one from me");
+ List<Tweet> user1Tweet = twitter.findTweetByBody("Here");
+ List<Tweet> user2Tweet = twitter.findTweetByBody("Saurabh");
assertNotNull(user1Tweet);
assertNotNull(user2Tweet);
Please sign in to comment.
Something went wrong with that request. Please try again.