{ "created_time":"", "text":"", "from": { "username":"", "profile_picture":"", "id":"", "full_name":"" }, "id":"" }
164165166167168169170171
/* * Test that no Exception is thrown for a valid user id */ Random rand = new Random(19580427); InstagramSession session = getNewSession(); Media media = session.getPopularMedia().get(rand.nextInt() % 10); //Comment comment = session.postComment(media.getId(), "nice pic"); }
173174175176177178179180181182183
@Test public void testRemoveComment() throws Exception, InterruptedException { Random rand = new Random(19580427); InstagramSession session = getNewSession(); Media media = session.getPopularMedia().get(rand.nextInt() % 10); //Comment comment = session.postComment(media.getId(), "nice pic"); //Thread.sleep(5); /* * Test that no Exception is thrown for a valid comment id */
186187188189190191192193194
@Test public void testLikingAndUnlikingMedia() throws Exception { Random rand = new Random(19580427); InstagramSession session = getNewSession(); Media media = session.getPopularMedia().get(rand.nextInt() % 10); session.likeMedia(media.getId()); session.removeMediaLike(media.getId()); }