Examples of ShoppingList


Examples of com.manning.siia.kitchen.domain.ShoppingList

*/
public class ShoppingListWriter {

    @Aggregator
    public ShoppingList sendShoppingList(List<Ingredient> ingredients) {
        ShoppingList list = new ShoppingList(ingredients.get(0).getType());
        for (Ingredient ingredient : ingredients) {
            list.addItem(ingredient);
        }
        return list;
    }
View Full Code Here

Examples of org.easycassandra.bean.model.ShoppingList

        Assert.assertTrue(persistence.insert(getPolianaShoppingList()));
    }

    private ShoppingList getPolianaShoppingList() {
        ShoppingList shopping = new ShoppingList();
        shopping.setDay(new Date());
        shopping.setName("Poliana");
        shopping.setFruits(new LinkedList<String>());
        shopping.getFruits().add("Orange");
        shopping.getFruits().add("beans");
        shopping.getFruits().add("rice");
        return shopping;
    }
View Full Code Here

Examples of org.easycassandra.bean.model.ShoppingList

    /**
     * run the test.
     */
    @Test
    public void retrieveTest() {
        ShoppingList list = persistence.retrieve(getPolianaShoppingList()
                .getName());
        Assert.assertNotNull(list);
    }
View Full Code Here

Examples of org.easycassandra.bean.model.ShoppingList

    /**
     * run the test.
     */
    @Test
    public void removeTest() {
        ShoppingList list = persistence.retrieve(getPolianaShoppingList()
                .getName());
        persistence.remove(list);
        list = persistence.retrieve(getPolianaShoppingList().getName());
        Assert.assertNull(list);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.