Package com.impetus.client.twitter.entities

Examples of com.impetus.client.twitter.entities.UserCassandra


        twitter.createEntityManager();
        List<UserCassandra> users = twitter.findUserByRating((short) 5);
        Assert.assertNotNull(users);
        Assert.assertFalse(users.isEmpty());
        Assert.assertTrue(users.size() == 1);
        UserCassandra user = users.get(0);
        Assert.assertNotNull(user);
        Assert.assertEquals(userId1, user.getUserId());
        ProfessionalDetailCassandra pd = user.getProfessionalDetail();
        Assert.assertNotNull(pd);
        Assert.assertEquals((short) 5, pd.getRating());
        twitter.closeEntityManager();

        twitter.createEntityManager();
        List<UserCassandra> users2 = twitter.findUserByRating((short) 8);
        Assert.assertNotNull(users2);
        Assert.assertFalse(users2.isEmpty());
        Assert.assertTrue(users2.size() == 1);
        UserCassandra user2 = users2.get(0);
        Assert.assertNotNull(user2);
        Assert.assertEquals(userId2, user2.getUserId());
        ProfessionalDetailCassandra pd2 = user2.getProfessionalDetail();
        Assert.assertNotNull(pd2);
        Assert.assertEquals((short) 8, pd2.getRating());
        twitter.closeEntityManager();
    }
View Full Code Here


        twitter.createEntityManager();
        List<UserCassandra> users = twitter.findUserByCompliance((float) 10.0);
        Assert.assertNotNull(users);
        Assert.assertFalse(users.isEmpty());
        Assert.assertTrue(users.size() == 1);
        UserCassandra user = users.get(0);
        Assert.assertNotNull(user);
        Assert.assertEquals(userId1, user.getUserId());
        ProfessionalDetailCassandra pd = user.getProfessionalDetail();
        Assert.assertNotNull(pd);
        Assert.assertEquals((float) 10.0, pd.getCompliance(), 0.0);
        twitter.closeEntityManager();

        twitter.createEntityManager();
        List<UserCassandra> users2 = twitter.findUserByCompliance((float) 9.80);
        Assert.assertNotNull(users2);
        Assert.assertFalse(users2.isEmpty());
        Assert.assertTrue(users2.size() == 1);
        UserCassandra user2 = users2.get(0);
        Assert.assertNotNull(user2);
        Assert.assertEquals(userId2, user2.getUserId());
        ProfessionalDetailCassandra pd2 = user2.getProfessionalDetail();
        Assert.assertNotNull(pd2);
        Assert.assertEquals((float) 9.80, pd2.getCompliance(), 0.0);
        twitter.closeEntityManager();
    }
View Full Code Here

        twitter.createEntityManager();
        List<UserCassandra> users = twitter.findUserByHeight(163.12);
        Assert.assertNotNull(users);
        Assert.assertFalse(users.isEmpty());
        Assert.assertTrue(users.size() == 1);
        UserCassandra user = users.get(0);
        Assert.assertNotNull(user);
        Assert.assertEquals(userId1, user.getUserId());
        ProfessionalDetailCassandra pd = user.getProfessionalDetail();
        Assert.assertNotNull(pd);
        Assert.assertEquals(163.12, pd.getHeight(), 0.0);
        twitter.closeEntityManager();

        twitter.createEntityManager();
        List<UserCassandra> users2 = twitter.findUserByHeight(323.3);
        Assert.assertNotNull(users2);
        Assert.assertFalse(users2.isEmpty());
        Assert.assertTrue(users2.size() == 1);
        UserCassandra user2 = users2.get(0);
        Assert.assertNotNull(user2);
        Assert.assertEquals(userId2, user2.getUserId());
        ProfessionalDetailCassandra pd2 = user2.getProfessionalDetail();
        Assert.assertNotNull(pd2);
        Assert.assertEquals(323.3, pd2.getHeight(), 0.0);
        twitter.closeEntityManager();

    }
View Full Code Here

        twitter.createEntityManager();
        List<UserCassandra> users = twitter.findUserByEnrolmentDate(new Date(Long.parseLong("1344079065781")));
        Assert.assertNotNull(users);
        Assert.assertFalse(users.isEmpty());
        Assert.assertTrue(users.size() == 1);
        UserCassandra user = users.get(0);
        Assert.assertNotNull(user);
        Assert.assertEquals(userId1, user.getUserId());
        ProfessionalDetailCassandra pd = user.getProfessionalDetail();
        Assert.assertNotNull(pd);
        Assert.assertEquals(new Date(Long.parseLong("1344079065781")), pd.getEnrolmentDate());
        twitter.closeEntityManager();

        twitter.createEntityManager();
        List<UserCassandra> users2 = twitter.findUserByEnrolmentDate(new Date(Long.parseLong("1344079063412")));
        Assert.assertNotNull(users2);
        Assert.assertFalse(users2.isEmpty());
        Assert.assertTrue(users2.size() == 1);
        UserCassandra user2 = users2.get(0);
        Assert.assertNotNull(user2);
        Assert.assertEquals(userId2, user2.getUserId());
        ProfessionalDetailCassandra pd2 = user2.getProfessionalDetail();
        Assert.assertNotNull(pd2);
        Assert.assertEquals(new Date(Long.parseLong("1344079063412")), pd2.getEnrolmentDate());
        twitter.closeEntityManager();

    }
View Full Code Here

        twitter.createEntityManager();
        List<UserCassandra> users = twitter.findUserByEnrolmentTime(new Date(Long.parseLong("1344079067623")));
        Assert.assertNotNull(users);
        Assert.assertFalse(users.isEmpty());
        Assert.assertTrue(users.size() == 1);
        UserCassandra user = users.get(0);
        Assert.assertNotNull(user);
        Assert.assertEquals(userId1, user.getUserId());
        ProfessionalDetailCassandra pd = user.getProfessionalDetail();
        Assert.assertNotNull(pd);
        Assert.assertEquals(new Date(Long.parseLong("1344079067623")), pd.getEnrolmentTime());
        twitter.closeEntityManager();

        twitter.createEntityManager();
        List<UserCassandra> users2 = twitter.findUserByEnrolmentTime(new Date(Long.parseLong("1344079068266")));
        Assert.assertNotNull(users2);
        Assert.assertFalse(users2.isEmpty());
        Assert.assertTrue(users2.size() == 1);
        UserCassandra user2 = users2.get(0);
        Assert.assertNotNull(user2);
        Assert.assertEquals(userId2, user2.getUserId());
        ProfessionalDetailCassandra pd2 = user2.getProfessionalDetail();
        Assert.assertNotNull(pd2);
        Assert.assertEquals(new Date(Long.parseLong("1344079068266")), pd2.getEnrolmentTime());
        twitter.closeEntityManager();

    }
View Full Code Here

        twitter.createEntityManager();
        List<UserCassandra> users = twitter.findUserByJoiningDateAndTime(new Date(Long.parseLong("1344079069105")));
        Assert.assertNotNull(users);
        Assert.assertFalse(users.isEmpty());
        Assert.assertTrue(users.size() == 1);
        UserCassandra user = users.get(0);
        Assert.assertNotNull(user);
        Assert.assertEquals(userId1, user.getUserId());
        ProfessionalDetailCassandra pd = user.getProfessionalDetail();
        Assert.assertNotNull(pd);
        Assert.assertEquals(new Date(Long.parseLong("1344079069105")), pd.getJoiningDateAndTime());
        twitter.closeEntityManager();

        twitter.createEntityManager();
        List<UserCassandra> users2 = twitter.findUserByJoiningDateAndTime(new Date(Long.parseLong("1344079061078")));
        Assert.assertNotNull(users2);
        Assert.assertFalse(users2.isEmpty());
        Assert.assertTrue(users2.size() == 1);
        UserCassandra user2 = users2.get(0);
        Assert.assertNotNull(user2);
        Assert.assertEquals(userId2, user2.getUserId());
        ProfessionalDetailCassandra pd2 = user2.getProfessionalDetail();
        Assert.assertNotNull(pd2);
        Assert.assertEquals(new Date(Long.parseLong("1344079061078")), pd2.getJoiningDateAndTime());
        twitter.closeEntityManager();
    }
View Full Code Here

        twitter.createEntityManager();
        List<UserCassandra> users = twitter.findUserByYearsSpent(new Integer(2));
        Assert.assertNotNull(users);
        Assert.assertFalse(users.isEmpty());
        Assert.assertTrue(users.size() == 1);
        UserCassandra user = users.get(0);
        Assert.assertNotNull(user);
        Assert.assertEquals(userId1, user.getUserId());
        ProfessionalDetailCassandra pd = user.getProfessionalDetail();
        Assert.assertNotNull(pd);
        Assert.assertEquals(new Integer(2), pd.getYearsSpent());
        twitter.closeEntityManager();

        twitter.createEntityManager();
        List<UserCassandra> users2 = twitter.findUserByYearsSpent(new Integer(5));
        Assert.assertNotNull(users2);
        Assert.assertFalse(users2.isEmpty());
        Assert.assertTrue(users2.size() == 1);
        UserCassandra user2 = users2.get(0);
        Assert.assertNotNull(user2);
        Assert.assertEquals(userId2, user2.getUserId());
        ProfessionalDetailCassandra pd2 = user2.getProfessionalDetail();
        Assert.assertNotNull(pd2);
        Assert.assertEquals(new Integer(5), pd2.getYearsSpent());
        twitter.closeEntityManager();
    }
View Full Code Here

        twitter.createEntityManager();
        List<UserCassandra> users = twitter.findUserByUniqueId(new Long(3634521523423L));
        Assert.assertNotNull(users);
        Assert.assertFalse(users.isEmpty());
        Assert.assertTrue(users.size() == 1);
        UserCassandra user = users.get(0);
        Assert.assertNotNull(user);
        Assert.assertEquals(userId1, user.getUserId());
        ProfessionalDetailCassandra pd = user.getProfessionalDetail();
        Assert.assertNotNull(pd);
        Assert.assertEquals(new Long(3634521523423L), pd.getUniqueId());
        twitter.closeEntityManager();

        twitter.createEntityManager();
        List<UserCassandra> users2 = twitter.findUserByUniqueId(new Long(25423452343L));
        Assert.assertNotNull(users2);
        Assert.assertFalse(users2.isEmpty());
        Assert.assertTrue(users2.size() == 1);
        UserCassandra user2 = users2.get(0);
        Assert.assertNotNull(user2);
        Assert.assertEquals(userId2, user2.getUserId());
        ProfessionalDetailCassandra pd2 = user2.getProfessionalDetail();
        Assert.assertNotNull(pd2);
        Assert.assertEquals(new Long(25423452343L), pd2.getUniqueId());
        twitter.closeEntityManager();
    }
View Full Code Here

        twitter.createEntityManager();
        List<UserCassandra> users = twitter.findUserByMonthlySalary(new Double(0.23452342343));
        Assert.assertNotNull(users);
        Assert.assertFalse(users.isEmpty());
        Assert.assertTrue(users.size() == 1);
        UserCassandra user = users.get(0);
        Assert.assertNotNull(user);
        Assert.assertEquals(userId1, user.getUserId());
        ProfessionalDetailCassandra pd = user.getProfessionalDetail();
        Assert.assertNotNull(pd);
        Assert.assertEquals(new Double(0.23452342343), pd.getMonthlySalary());
        twitter.closeEntityManager();

        twitter.createEntityManager();
        List<UserCassandra> users2 = twitter.findUserByMonthlySalary(new Double(0.76452343));
        Assert.assertNotNull(users2);
        Assert.assertFalse(users2.isEmpty());
        Assert.assertTrue(users2.size() == 1);
        UserCassandra user2 = users2.get(0);
        Assert.assertNotNull(user2);
        Assert.assertEquals(userId2, user2.getUserId());
        ProfessionalDetailCassandra pd2 = user2.getProfessionalDetail();
        Assert.assertNotNull(pd2);
        Assert.assertEquals(new Double(0.76452343), pd2.getMonthlySalary());
        twitter.closeEntityManager();
    }
View Full Code Here

        List<UserCassandra> users = twitter.findUserByBirthday(new java.sql.Date(new Date(Long
                .parseLong("1344079061111")).getTime()));
        Assert.assertNotNull(users);
        Assert.assertFalse(users.isEmpty());
        Assert.assertTrue(users.size() == 1);
        UserCassandra user = users.get(0);
        Assert.assertNotNull(user);
        Assert.assertEquals(userId1, user.getUserId());
        ProfessionalDetailCassandra pd = user.getProfessionalDetail();
        Assert.assertNotNull(pd);
        Assert.assertEquals(new java.sql.Date(new Date(Long.parseLong("1344079061111")).getTime()), pd.getBirthday());
        twitter.closeEntityManager();

        twitter.createEntityManager();
        List<UserCassandra> users2 = twitter.findUserByBirthday(new java.sql.Date(new Date(Long
                .parseLong("1344079064444")).getTime()));
        Assert.assertNotNull(users2);
        Assert.assertFalse(users2.isEmpty());
        Assert.assertTrue(users2.size() == 1);
        UserCassandra user2 = users2.get(0);
        Assert.assertNotNull(user2);
        Assert.assertEquals(userId2, user2.getUserId());
        ProfessionalDetailCassandra pd2 = user2.getProfessionalDetail();
        Assert.assertNotNull(pd2);
        Assert.assertEquals(new java.sql.Date(new Date(Long.parseLong("1344079064444")).getTime()), pd2.getBirthday());
        twitter.closeEntityManager();
    }
View Full Code Here

TOP

Related Classes of com.impetus.client.twitter.entities.UserCassandra

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.