Package org.easycassandra.bean.model

Examples of org.easycassandra.bean.model.Person


        Drink drink = new Drink();
        drink.setId(1L);
        drink.setFlavor("orange");
        drink.setName("cup of juice");

        Person person = new Person();
        person.setId(1L);
        person.setName("otávio");
        person.setYear(YEAR);
        personDao.insert(person);

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


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

        Person person = getPerson();
        person.setName(NAME);
        person.setId(FOUR);
        person.setYear(YEAR);
        Address address = getAddress();
        person.setAddress(address);

        Assert.assertTrue(dao.insert(person));

    }
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));
    }
View Full Code Here

    /**
     * run the test.
     */
    @Test
    public void listTest() {
        Person person = getPerson();
        person.setId(1L);
        dao.insert(person);
        dao.listAll(new ResultAsyncCallBack<List<Person>>() {

            @Override
            public void result(List<Person> beans) {
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

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

        Person person = getPerson();
        person.setName(NAME);
        person.setId(FOUR);
        person.setYear(YEAR);
        Address address = getAddress();
        person.setAddress(address);

        Assert.assertTrue(dao.insert(person));

    }
View Full Code Here

    /**
     * run the test.
     */
    @Test
    public void retrieveTest() {
        Person person = dao.retrieve(FOUR);
        Assert.assertTrue(person.getName().toLowerCase().contains("otavio"));
    }
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.