Package org.easycassandra.bean.model

Examples of org.easycassandra.bean.model.Person


    /**
     * run the test.
     */
    @Test
    public void retrieveSubClassTest() {
        Person person = dao.retrieve(FOUR);

        Assert.assertNotNull(person.getAddress().getCity());
    }
View Full Code Here


    /**
     * run the test.
     */
    @Test
    public void retrieveEnumTest() {
        Person person = dao.retrieve(FOUR);
        Assert.assertEquals(person.getSex(), Sex.MALE);
    }
View Full Code Here

    /**
     * run the test.
     */
    @Test
    public void retrieveEnumEmptyTest() {
        Person person = dao.retrieve(FOUR);
        Assert.assertNotNull(person.getSex());
    }
View Full Code Here

     * run the test.
     */
    @Test
    public void overrideTest() {

        Person person = getPerson();
        person.setId(1L);
        Assert.assertTrue(dao.insert(person));
    }
View Full Code Here

    /**
     * run the test.
     */
    @Test
    public void removeTest() {
        Person person = getPerson();
        person.setId(1L);
        Assert.assertTrue(dao.insert(person));
        Assert.assertTrue(dao.remove(person));
        Assert.assertNull(dao.retrieve(1L));
    }
View Full Code Here

    /**
     * run the test.
     */
    @Test
    public void cantRetrieve() {
        Person person = dao.retrieve(new Long(-1));
        Assert.assertNull(person);
    }
View Full Code Here

    /**
     * run the test.
     */
    @Test
    public void listTest() {
        Person person = getPerson();
        person.setId(1L);
        dao.insert(person);
        Assert.assertTrue(dao.listAll().size() > 0);

    }
View Full Code Here

    /**
     * run the test.
     */
    @Test
    public void insertFileTest() {
        Person person = getPerson();
        person.setName(NAME);
        person.setId(FOUR);
        Address address = getAddress();
        person.setAddress(address);

        Assert.assertTrue(dao.insert(person));
    }
View Full Code Here

    /**
     * run the test.
     */
    @Test
    public void insertWithPerson() {
        Person person = getPerson();
        person.setName(NAME);
        person.setId(SAMPLE_ID);
        Assert.assertTrue(dao.insert(person));
    }
View Full Code Here

        address.setState("Bahia");
        return address;
    }

    private Person getPerson() {
        Person person = new Person();
        person.setYear(TEN);
        person.setName(NAME);
        person.setSex(Sex.MALE);
        return person;
    }
View Full Code Here

TOP

Related Classes of org.easycassandra.bean.model.Person

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.